When a user click on a (html) Textfield
in a WebView
, the soft keyboard is shown.
But when I load some JS with WebView.loadUrl()
the soft keyboard disappears.
I understand the behaviour when you load a new page. But how can I change the behaviour of the WebView
when loading JS?
Is there another way to load JS?
I also tried to handle the keyboard manually. But there are too many drawbacks.
It is complicated to determine if the keyboard is shown. And I would have to change my layout:
How to check visibility of software keyboard in Android?
And the keyboard would not be in the control of the WebView
anymore.
Q: How to load JS into a WebView, without affecting the soft keyboard?