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...
3 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?
Hi fellows,
We are having same troubles with WT6300 (Android 10), using EnterpriseBrowser (version 3.0.6.0).
We can not achieve autofocus on a first text field on the web application. Even, when the app is running on the login page and there is a keystroke it appears a blue highlight on the whole screen.
Looking for some solution excluding the need for changes on the server-based web app.