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

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

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

7条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-17 15:08

    I used regeint solution but modified a bit it doesn't work because i told phonegap to allow showing the keyboard without user interaction in Cordova.plist i set KeyboardDisplayRequiresUserAction to NO

    function hideTheKeyBoard() {
        $($.mobile.pageContainer).after('');
        $('#focusable').focus();// maybe .blur() would work too.
        $('#focusable').remove();
    }
    

提交回复
热议问题