I've got an Android project using a WebView to display a WebApp. In this app, there are some text input fields. In order to avoid hiding the field while opening the keyboard, the .imePadding() has been added to the modifier of the WebView.
> WebView(
> modifier = modifier.fillMaxSize(),
> state = state,
> client = object : AccompanistWebViewClient() { ... },
> onCreated = { webView ->
> webView.settings.cacheMode = WebSettings.LOAD_DEFAULT
> webView.settings.domStorageEnabled = true
> webView.settings.javaScriptEnabled = true
> webView.clearCache(true)
> webView.addJavascriptInterface(WebViewInterface {
> onWebEventDecode(it)
> }, "Interface")
> }
> )
Issue is, that after opening a TextField and hiding the keyboard, any interaction with the WebView is disabled. For example, the integrated back button in the WebView receives the action (can see it throough the logs) but no action is executed.
Test without the .imePadding() option does not disable the interactions.
Do you guys have any idea why the WebView loses control over its interactions following a hideime() ?
I've tried to check in the view keeps the focus (it does, I could have checked it while logging the client). I've also tried several webview options like isNestedScrollingEnabled = true without success.