Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebView doesn't bring up keyboard on text fields #403

Open
dylan-cm opened this issue Apr 30, 2019 · 6 comments
Open

WebView doesn't bring up keyboard on text fields #403

dylan-cm opened this issue Apr 30, 2019 · 6 comments

Comments

@dylan-cm
Copy link

I am experiencing this issue on Android devices using the example provided here:
https://github.com/fluttercommunity/flutter_webview_plugin/blob/master/example/lib/main.dart

Tapping on a text field on a webpage within webview does not make a focus node (not sure if that's the right terminology). No keyboard is coming up and tap-and-hold doesn't bring up the copy/paste/etc dialog. A curser is blinking but does not seem focused on the text field.

Tested this on Samsung Galaxy 9+ and the nexus5 / pixel c emulators and ios emulator (ios12.2 iphone 10s).

@dylan-cm
Copy link
Author

I am also getting this in the terminal every time I tap on a text field:

W/cr_AwAutofillManager(25673): WebView autofill is disabled because WebView isn't created with activity context.

@ghost
Copy link

ghost commented May 20, 2019

Yep. I have the same issue.

@gem85247
Copy link

same here, any fixes yet?

@smaharjan974
Copy link

use resizeToAvoidBottomInset: true it works for me

@matthewrice345
Copy link

matthewrice345 commented Sep 10, 2019

I tried resizeToAvoidBottomInset and it did not work for me. Reproducible with a Pixel 2.

Here is the exception when a text field in a webview is tapped.

Display ID mismatch found. ViewRootImpl displayId=6 InputMethodManager displayId=0. Use the right InputMethodManager instance to avoid performance overhead. java.lang.Throwable at android.view.inputmethod.InputMethodManager.getFallbackInputMethodManagerIfNecessary(InputMethodManager.java:537) at android.view.inputmethod.InputMethodManager.showSoftInput(InputMethodManager.java:1409) at org.chromium.content.browser.input.ImeAdapterImpl.m(PG:227) at org.chromium.content.browser.input.ImeAdapterImpl.updateState(PG:209) at android.os.MessageQueue.nativePollOnce(Native Method) at android.os.MessageQueue.next(MessageQueue.java:336) at android.os.Looper.loop(Looper.java:174) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)

One more piece of context. We are using the FlutterFragmentActivity at the root of our app.

@charafau
Copy link
Collaborator

that seems strange, keyboard shows on my emulator and devices (pixel 3, pixel, nexus 6p). Can you guys check if that works for example/ in this repository? Maybe there is some property which is causing that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants