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:
- Upgrade to the released version (from the jQM alpha)
- The keyboard only disappears if the input is no longer in focus - does the input field lose focus when you click elsewhere?
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
精彩评论