How to hide keyboard in jQueryMobile page in a Phonegap app?

后端 未结 7 556
庸人自扰
庸人自扰 2020-12-17 14:23

I have a problem with hiding keyboard in the iPhone simulator. My HTML code:

相关标签:
7条回答
  • 2020-12-17 15:15

    from here

    It's pretty self-explanatory. The 2nd line will de-focus all input fields, and it relies on jQuery. I found that calling blur() on the single focused textfield didn't always work. Either one of these lines should work independently, but both of them together cannot be stopped!

    var hideKeyboard = function() {
        document.activeElement.blur();
        $("input").blur();
    };
    
    0 讨论(0)
提交回复
热议问题