When I have static controls on my webpage I am able to set the focus to a control using the following:
@Html.TextBoxFor(m => m.UserName, new{ id = "usertxtId",
autofocus = "autofocus",
Style = "background-color:gray;color:black;font-size:2em;width:100%"
})
$(function ()
{
$("#usertxtId").focus();
$('#usertxtId').get(0).focus();
});
However when I am dynamically creating controls This is not working ... at one point I had it so the control would get highlighted, but the form would not allow me to enter data... I had to remove several conflicting libraries (jquery mobile) and now this no longer works.
For my dynamic controls I am using the same code model as the static (see above) ... but it is not working...
2 Replies
Dear Brian Smith,
I am waiting for your inputs. There is a known focus issue on EnterpriseBrowser 1.5 with WM/CE devices.
There is a patch available for the same. if your issue falls under EB1.5 and wm/ce devices, please contact the support team for the patch.
Otherwise please provide more details on the device and EB version that you are using.
Thanks & Regards,
Sabir VT
which version of the EB are you using? Also on which Device and OS used?