1
0
Fork 0

For #8968: Hide keyboard when navigating away from browser

master
mcarare 2020-03-05 14:11:48 +02:00 committed by Emily Kager
parent 3647606aae
commit 012e318724
1 changed files with 4 additions and 0 deletions

View File

@ -56,6 +56,7 @@ import mozilla.components.support.base.feature.PermissionsFeature
import mozilla.components.support.base.feature.UserInteractionHandler
import mozilla.components.support.base.feature.ViewBoundFeatureWrapper
import mozilla.components.support.ktx.android.view.exitImmersiveModeIfNeeded
import mozilla.components.support.ktx.android.view.hideKeyboard
import org.mozilla.fenix.FeatureFlags
import org.mozilla.fenix.HomeActivity
import org.mozilla.fenix.IntentReceiverActivity
@ -553,6 +554,9 @@ abstract class BaseBrowserFragment : Fragment(), UserInteractionHandler, Session
@CallSuper
final override fun onPause() {
super.onPause()
if (findNavController().currentDestination?.id != R.id.searchFragment) {
view?.hideKeyboard()
}
fullScreenFeature.onBackPressed()
}