Prevent keyboard from popping on textbox focus/click in iPad webapps

后端 未结 7 1208
孤街浪徒
孤街浪徒 2021-02-08 10:36

I am trying to create a custom keyboard on an iPad application. But each time the input get the focus, the native iPad keyboard pops up. How can I prevent this, in JavaScript.

7条回答
  •  攒了一身酷
    2021-02-08 10:57

    You should check the safari sdk, there are some extra input types available with mobile safari/html5.

    Otherwise you could style a div/span to look like an input and have a backing hidden field, then when it is clicked on bring up your custom div etc and put values into the "input" based on the users actions.

    Of course you would do this with progressive enhancement and render this as a normal textbox then on the loading of the page swap the normal text input for your hidden field/div/span etc

提交回复
热议问题