cordova-plugin-keyboard icon indicating copy to clipboard operation
cordova-plugin-keyboard copied to clipboard

[Question] How to stop the keyboard from closing

Open larssn opened this issue 8 years ago • 4 comments

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?

larssn avatar Jul 18 '17 19:07 larssn

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

ccorcos avatar Jul 21 '17 23:07 ccorcos

Exactly same issue here.

UOCecalero avatar May 03 '18 15:05 UOCecalero

@UOCecalero check out this one: https://github.com/onderceylan/cordova-plugin-wkwebview-inputfocusfix

ccorcos avatar May 03 '18 17:05 ccorcos

I've found the solution! You have to return false onmousedown event button function:

http://jsfiddle.net/Ddffh/143/

It worked for me.

Greetings

UOCecalero avatar May 04 '18 13:05 UOCecalero