diff --git a/app/src/main/java/org/mozilla/fenix/search/SearchFragment.kt b/app/src/main/java/org/mozilla/fenix/search/SearchFragment.kt index 9a45d082f6..9254576354 100644 --- a/app/src/main/java/org/mozilla/fenix/search/SearchFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/search/SearchFragment.kt @@ -18,6 +18,7 @@ import android.view.ViewGroup import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AppCompatActivity import androidx.fragment.app.Fragment +import androidx.navigation.Navigation import kotlinx.android.synthetic.main.fragment_search.* import kotlinx.android.synthetic.main.fragment_search.view.* import mozilla.components.browser.search.SearchEngine @@ -233,7 +234,7 @@ class SearchFragment : Fragment(), BackHandler { getManagedEmitter().onNext(AwesomeBarChange.UpdateQuery(it.query)) } is SearchAction.EditingCanceled -> { - activity?.onBackPressed() + Navigation.findNavController(toolbar_wrapper).navigateUp() } } }