cordova-plugin-keyboard
cordova-plugin-keyboard copied to clipboard
[Question] How to stop the keyboard from closing
So we have a textarea that opens the keyboard, and a button next to it. When the button is clicked, we desire the keyboard to stay open.
We've had limited success using the touchend event on the button, end then preventDefault. It stops the keyboard from closing but it seems to mess up some underlying native functionality like the spellcheck in IOS, and the text doesn't clear properly on Android.
Any suggestions?
I'm using this plugin and just calling focus() when I need to keep the keyboard open: https://github.com/ccorcos/cordova-plugin-wkwebview-engine
Exactly same issue here.
@UOCecalero check out this one: https://github.com/onderceylan/cordova-plugin-wkwebview-inputfocusfix
I've found the solution! You have to return false onmousedown event button function:
http://jsfiddle.net/Ddffh/143/
It worked for me.
Greetings