PDA

View Full Version : focus on field on iPad




Jeff7645
Aug 18, 2010, 02:41 AM
I'm currently making a web application which needs to be fully compatible with iPad. The functions I've implemented so far work perfectly on Firefox, Internet Explorer and other browsers. However, the iPad itself responds a bit different.

After a certain action, I want to put focus on a textfield with the help of Javascript. Again, this works perfectly with the normal browser, the iPad browser however seems to be blocking the focus.

The reason I'm not posting any code is because it's basically irrelevant. All I do is:
<<<SOME_CONTROL>>>.focus();
Other functions of the control seem to work perfectly, adjusting the backgroundColor of the same control for example seems to be no problem:
<<<SOME_CONTROL>>>.style.backgroundColor = "#77FFFF";

Any ideas?
Thanks in advance



newb16
Aug 18, 2010, 04:58 AM
Is this your case? It may be not if your one doesn't work for all controls and/or not only during onload.
http://stackoverflow.com/questions/2398528/set-textbox-focus-in-mobile-safari