javascript - How can I suppress keyboard popup on an iPad HTML5 app? -
i’ve written html5 application ipad. has 1 input field. every time user comes page, popup keyboard appears.
how can suppress default behavior within html5/js context?
in app, if type in login & password, shows screen (without page reload). keyboard still exists, , have manually hide it.
i’m not sure understand description of problem, seems incomplete. try re-stating it, see if understand correctly?
- the user opens safari on ipad
- the user types address of html5 app safari’s address bar, , taps “go” button
- the user taken app’s login page. tap username field, , popup keyboard appears.
- they type in username, switch password field, type in password, , tap “go” button.
- your app loads different content on screen via javascript. popup keyboard still present.
if that’s problem you’re having, might worth calling blur
function on username , password fields before load content of new page. might make keyboard go away.
if html these fields looked this:
<input type="text" name="username" id="username"> <input type="password" name="password" id="password">
then javascript be:
document.getelementbyid('username').blur(); document.getelementbyid('password').blur();
Comments
Post a Comment