commit 92ae17ea96c8c54fdcaaa1d821b06a05e41c4cc1
parent 67155069de2a15eb345820806283ed3f00f777fe
Author: Mugurell <Mugurell@users.noreply.github.com>
Date: Tue, 4 Nov 2025 08:21:23 +0000
Bug 1990639 - Anchor bottom toolbar to screen bottom when clicking URL with find in page active r=android-reviewers,skhan
Differential Revision: https://phabricator.services.mozilla.com/D271007
Diffstat:
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/browser/BaseBrowserFragment.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/browser/BaseBrowserFragment.kt
@@ -2609,6 +2609,10 @@ abstract class BaseBrowserFragment :
}
private fun setupIMEInsetsHandling(view: View) {
+ // Ensure that navigating to new webpages which triggers this handling being set again
+ // would not leave the engine view with half set values from the previous animation.
+ (view.layoutParams as? ViewGroup.MarginLayoutParams)?.bottomMargin = 0
+
when (context?.settings()?.toolbarPosition) {
ToolbarPosition.BOTTOM -> {
val toolbar = listOf(
@@ -2616,6 +2620,9 @@ abstract class BaseBrowserFragment :
_browserToolbarView?.layout,
).firstOrNull { it != null } ?: return
+ // Ensure the toolbar is anchored to the bottom of the screen.
+ (toolbar.layoutParams as? ViewGroup.MarginLayoutParams)?.bottomMargin = 0
+
ImeInsetsSynchronizer.setup(
targetView = toolbar,
insetsSource = view,