diff --git a/components/browser/engine-gecko-beta/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngineView.kt b/components/browser/engine-gecko-beta/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngineView.kt index 1e12f89bfd5..9661e53df60 100644 --- a/components/browser/engine-gecko-beta/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngineView.kt +++ b/components/browser/engine-gecko-beta/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngineView.kt @@ -5,6 +5,7 @@ package mozilla.components.browser.engine.gecko import android.content.Context +import android.support.v4.view.ViewCompat import android.util.AttributeSet import android.widget.FrameLayout import mozilla.components.concept.engine.EngineSession @@ -27,6 +28,10 @@ class GeckoEngineView @JvmOverloads constructor( super.onDetachedFromWindow() } + }.apply { + // Explicitly mark this view as important for autofill. The default "auto" doesn't seem to trigger any + // autofill behavior for us here. + ViewCompat.setImportantForAutofill(this, 0x1 /* View.IMPORTANT_FOR_AUTOFILL_YES */) } init { diff --git a/components/browser/engine-gecko-nightly/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngineView.kt b/components/browser/engine-gecko-nightly/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngineView.kt index 1e12f89bfd5..9661e53df60 100644 --- a/components/browser/engine-gecko-nightly/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngineView.kt +++ b/components/browser/engine-gecko-nightly/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngineView.kt @@ -5,6 +5,7 @@ package mozilla.components.browser.engine.gecko import android.content.Context +import android.support.v4.view.ViewCompat import android.util.AttributeSet import android.widget.FrameLayout import mozilla.components.concept.engine.EngineSession @@ -27,6 +28,10 @@ class GeckoEngineView @JvmOverloads constructor( super.onDetachedFromWindow() } + }.apply { + // Explicitly mark this view as important for autofill. The default "auto" doesn't seem to trigger any + // autofill behavior for us here. + ViewCompat.setImportantForAutofill(this, 0x1 /* View.IMPORTANT_FOR_AUTOFILL_YES */) } init { diff --git a/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngineView.kt b/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngineView.kt index 5de65214198..60677d7751f 100644 --- a/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngineView.kt +++ b/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngineView.kt @@ -5,6 +5,7 @@ package mozilla.components.browser.engine.gecko import android.content.Context +import android.support.v4.view.ViewCompat import android.util.AttributeSet import android.widget.FrameLayout import mozilla.components.concept.engine.EngineSession @@ -27,6 +28,10 @@ class GeckoEngineView @JvmOverloads constructor( super.onDetachedFromWindow() } + }.apply { + // Explicitly mark this view as important for autofill. The default "auto" doesn't seem to trigger any + // autofill behavior for us here. + ViewCompat.setImportantForAutofill(this, 0x1 /* View.IMPORTANT_FOR_AUTOFILL_YES */) } init { diff --git a/docs/changelog.md b/docs/changelog.md index 09242c6ff92..3236bd9ced6 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -38,6 +38,9 @@ permalink: /changelog/ * **feature-session-bundling** * Added `SessionBundleStorage.autoClose()`: When "auto close" is enabled the currently active `SessionBundle` will automatically be closed and a new `SessionBundle` will be started if the bundle lifetime expires while the app is in the background. +* **browser-engine-gecko**, **browser-engine-gecko-beta**, **browser-engine-gecko-nightly**: + * Fixed an issue that caused [autofill](https://developer.android.com/guide/topics/text/autofill) to not work with those components. + # 0.43.0 * [Commits](https://github.com/mozilla-mobile/android-components/compare/v0.42.0...v0.43.0)