-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
[Android] Webview scroll gets stuck when form autocomplete is displayed #13241
Comments
Summary: Adds functionality to be able to disable saving of form data and thereby disabling autocomplete in webview on Android. Can be used as a workaround for #13241 Manual testing that autocomplete is disabled when the property is set to true, and still enabled when it is unset or set to false. Closes #13271 Differential Revision: D4858899 Pulled By: ericvicenti fbshipit-source-id: 62738b0685e4c1958c8a32e184fa2fe4f711b336
Summary: Adds functionality to be able to disable saving of form data and thereby disabling autocomplete in webview on Android. Can be used as a workaround for facebook#13241 Manual testing that autocomplete is disabled when the property is set to true, and still enabled when it is unset or set to false. Closes facebook#13271 Differential Revision: D4858899 Pulled By: ericvicenti fbshipit-source-id: 62738b0685e4c1958c8a32e184fa2fe4f711b336
Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally! If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:
If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution. |
Description
On a Android 7.0 high-resolution device, if you have a webview that goes to a page with a form on it, and that form is completed once, the webview saves the form data. When you go to the same form again and tap on a field, the autocomplete suggestion dropdown is displayed and when this happens the webview scrolls to the top and gets stuck there. When trying to scroll down, the webview scrolls a bit and then jumps back to the top.
If you have tap on the screen (removing focus from the form), the autocomplete closes and you can once again scroll normally.
This bug does not occur with a normal Android webview, only with the react-native WebView.
I was not able to reproduce it on a Samsung S5 Android 6.0 or in an emulator, only on the S7 Edge Android 7.0 and Pixel XL Android 7.1.1. It is possible it only occurs on higher resolution device.
Reproduction Steps and Sample Code
Sample react-native app to reproduce: https://github.com/farazs/webview-sample
Sample native android app where bug is not reproducible: https://github.com/farazs/android-webview-form-sample
Solution
I am not sure why this occurs or what the direct solution is. It seems like some kind of layout bug.
A workaround could be adding a prop to WebView to allow disabling of the autocomplete functionality
view.getSettings().setSaveFormData(false);
Additional Information
The text was updated successfully, but these errors were encountered: