mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-08 22:42:05 +08:00
Webview disable save form prop
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 https://github.com/facebook/react-native/pull/13271 Differential Revision: D4858899 Pulled By: ericvicenti fbshipit-source-id: 62738b0685e4c1958c8a32e184fa2fe4f711b336
This commit is contained in:
committed by
Facebook Github Bot
parent
2336ac299c
commit
8591d8ae71
@@ -397,6 +397,11 @@ public class ReactWebViewManager extends SimpleViewManager<WebView> {
|
||||
public void setAllowUniversalAccessFromFileURLs(WebView view, boolean allow) {
|
||||
view.getSettings().setAllowUniversalAccessFromFileURLs(allow);
|
||||
}
|
||||
|
||||
@ReactProp(name = "saveFormDataDisabled")
|
||||
public void setSaveFormDataDisabled(WebView view, boolean disable) {
|
||||
view.getSettings().setSaveFormData(!disable);
|
||||
}
|
||||
|
||||
@ReactProp(name = "injectedJavaScript")
|
||||
public void setInjectedJavaScript(WebView view, @Nullable String injectedJavaScript) {
|
||||
|
||||
Reference in New Issue
Block a user