How can I suppress keyboard popup in iPad HTML5 app?

I wrote an HTML5 app for iPad. It has one input field. Each time a user comes to this page, a pop-up keyboard appears.

How can I suppress this default behavior in the context of HTML5 / JS?

In my application, if you enter a username and password, it shows a different screen (without reloading the page). But the keyboard still exists, and you have to manually hide it.

+3
source share
1 answer

I'm not sure that I understand your description of your problem, it seems incomplete. Can I try to repeat it to see if I understood correctly?

  • Safari iPad.
  • HTML5 Safaris ""
  • . , .
  • , , "".
  • JavaScript. .

, , , blur , . .

HTML :

<input type="text" name="username" id="username">
<input type="password" name="password" id="password">

JavaScript :

document.getElementById('username').blur();
document.getElementById('password').blur();
+9

Source: https://habr.com/ru/post/1756230/


All Articles