简体   繁体   中英

Focus on textarea on webView does not open soft keyboard - kitkat 4.4

I have a WebView with one input (textarea) , I set this input focus using focus() and there's no soft keyboard on devices running android kitkat (checked 2 devices running 4.4.4). while on devices running android lollipop(checked on 3 devices running 5.0.1 and 5.1.1) there's keyboard and everything works as expected. webkit version is same for all devices (537.36)

any idea how can I get keyboard to show up on 4.4.4 devices? Thanks

If your App is developed by cordova use this code

cordova.plugins.keyboard.show(); // for keyboard open 

cordova.plugins.keyboard.close(); or cordova.plugins.keyboard.hide(); // for closing keyboard

First need to add keyboard plugin

its working for me try yourself

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM