From d39b28ead65682d448fa8e54222c2336c44d4033 Mon Sep 17 00:00:00 2001 From: Roger Yang Date: Mon, 7 Feb 2022 19:28:39 -0500 Subject: [PATCH] [fenix] Close https://github.com/mozilla-mobile/fenix/issues/23626: Do not exit edit mode in history search toolbar --- .../fenix/library/history/toolbar/ToolbarView.kt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/mozilla/fenix/library/history/toolbar/ToolbarView.kt b/app/src/main/java/org/mozilla/fenix/library/history/toolbar/ToolbarView.kt index c52c6f9be6..8610780a04 100644 --- a/app/src/main/java/org/mozilla/fenix/library/history/toolbar/ToolbarView.kt +++ b/app/src/main/java/org/mozilla/fenix/library/history/toolbar/ToolbarView.kt @@ -11,6 +11,7 @@ import androidx.core.content.ContextCompat import mozilla.components.browser.toolbar.BrowserToolbar import mozilla.components.support.ktx.android.content.getColorFromAttr import mozilla.components.support.ktx.android.content.res.resolveAttribute +import mozilla.components.support.ktx.android.view.hideKeyboard import org.mozilla.fenix.R import org.mozilla.fenix.library.history.HistorySearchFragmentState @@ -72,10 +73,17 @@ class ToolbarView( private = isPrivate + setOnUrlCommitListener { + hideKeyboard() + + // We need to return false to not show display mode + false + } + setOnEditListener(object : mozilla.components.concept.toolbar.Toolbar.OnEditListener { override fun onCancelEditing(): Boolean { interactor.onEditingCanceled() - // We need to return false to notHistorySearchFragmentStore.kt show display mode + // We need to return false to not show display mode return false }