Skip to content

Commit bba8d7a

Browse files
Merge pull request #40 from MetaMask/fix/disable-autofill
Disable Autofill
2 parents 91cc487 + 5321def commit bba8d7a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManagerImpl.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ class RNCWebViewManagerImpl {
9494
if (ReactBuildConfig.DEBUG) {
9595
WebView.setWebContentsDebuggingEnabled(true)
9696
}
97+
// Remove google autofill for Android > 8
98+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
99+
webView.setImportantForAutofill(View.IMPORTANT_FOR_AUTOFILL_NO);
100+
}
97101
webView.setDownloadListener(DownloadListener { url, userAgent, contentDisposition, mimetype, contentLength ->
98102
webView.setIgnoreErrFailedForThisURL(url)
99103
val module = webView.themedReactContext.getNativeModule(RNCWebViewModule::class.java) ?: return@DownloadListener

0 commit comments

Comments
 (0)