Skip to content

Commit

Permalink
browser-engine-gecko-*: Explicitly set autofill flag.
Browse files Browse the repository at this point in the history
  • Loading branch information
pocmo authored and jonalmeida committed Feb 21, 2019
1 parent 7fb2660 commit 886d532
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand Down
3 changes: 3 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 886d532

Please sign in to comment.