From 87a5ebc7226df11148b3364022145b188106230f Mon Sep 17 00:00:00 2001 From: Emily Kager Date: Thu, 2 May 2019 13:08:55 -0700 Subject: [PATCH] [fenix] For https://github.com/mozilla-mobile/fenix/issues/2225 - Don't pass click events under find in page bar --- .../mozilla/fenix/components/toolbar/ToolbarIntegration.kt | 2 ++ app/src/main/res/layout/fragment_browser.xml | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/mozilla/fenix/components/toolbar/ToolbarIntegration.kt b/app/src/main/java/org/mozilla/fenix/components/toolbar/ToolbarIntegration.kt index 494133428e..72b36b33da 100644 --- a/app/src/main/java/org/mozilla/fenix/components/toolbar/ToolbarIntegration.kt +++ b/app/src/main/java/org/mozilla/fenix/components/toolbar/ToolbarIntegration.kt @@ -16,6 +16,7 @@ import mozilla.components.feature.toolbar.ToolbarFeature import mozilla.components.feature.toolbar.ToolbarPresenter import mozilla.components.lib.publicsuffixlist.PublicSuffixList import mozilla.components.support.base.feature.LifecycleAwareFeature +import mozilla.components.support.ktx.android.view.hideKeyboard import org.mozilla.fenix.DefaultThemeManager import org.mozilla.fenix.R import org.mozilla.fenix.browser.BrowserFragmentDirections @@ -51,6 +52,7 @@ class ToolbarIntegration( val tabsAction = TabCounterToolbarButton( sessionManager, { + toolbar.hideKeyboard() Navigation.findNavController(toolbar) .navigate(BrowserFragmentDirections.actionBrowserFragmentToHomeFragment()) }, diff --git a/app/src/main/res/layout/fragment_browser.xml b/app/src/main/res/layout/fragment_browser.xml index e7d287eb95..cb88c16bbe 100644 --- a/app/src/main/res/layout/fragment_browser.xml +++ b/app/src/main/res/layout/fragment_browser.xml @@ -32,9 +32,10 @@ android:layout_height="56dp" android:layout_gravity="bottom" android:background="?foundation" - mozac:findInPageResultCountTextColor="?primaryText" - mozac:findInPageButtonsTint="?primaryText" + android:clickable="true" android:visibility="gone" - app:layout_behavior="org.mozilla.fenix.components.FindInPageBarBehavior" /> + app:layout_behavior="org.mozilla.fenix.components.FindInPageBarBehavior" + mozac:findInPageButtonsTint="?primaryText" + mozac:findInPageResultCountTextColor="?primaryText" /> \ No newline at end of file