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?

  1. the user opens safari on ipad
  2. the user types address of html5 app safari’s address bar, , taps “go” button
  3. the user taken app’s login page. tap username field, , popup keyboard appears.
  4. they type in username, switch password field, type in password, , tap “go” button.
  5. 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

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -