开发者

Tap screen to close keyboard in jQuery Mobile

开发者 https://www.devze.com 2023-03-06 19:46 出处:网络
We are developing an iPad application with jquery mobile 1.0a4.1.js.We are having some issues with the keyboard.Normal behavior on the ipad is that when a textbox has focus, the keyboard will come up.

We are developing an iPad application with jquery mobile 1.0a4.1.js. We are having some issues with the keyboard. Normal behavior on the ipad is that when a textbox has focus, the keyboard will come up. When you click anywhere in the document the keyboard will close. It seems like with jquery mobile that this behavior is lost. Does anyone have a work around for this? Its annoying that you need to click the close button on the keyboard 开发者_开发问答to get rid of it.


3 Things come to mind:

  1. Upgrade to the released version (from the jQM alpha)
  2. The keyboard only disappears if the input is no longer in focus - does the input field lose focus when you click elsewhere?
  3. Use rsplak's answer

    $('#input').blur();
    


Close Keypad simply in jQuery

$('your_input_class_or_id').blur();

You can bind this query in the method, where you want to close the Keypad

0

精彩评论

暂无评论...
验证码 换一张
取 消