mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-03 23:15:31 +00:00
[fenix] For https://github.com/mozilla-mobile/fenix/issues/23500: creditcards: hide keyboard when pausing fragment
Right now, the soft keyboard will remain open when we exit the "Add Card" screen. Let's make it so that the soft keyboard is automatically closed when leaving this screen.
This commit is contained in:
parent
42c495d444
commit
7a57194a48
@ -15,6 +15,7 @@ import androidx.navigation.fragment.navArgs
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
import mozilla.components.support.ktx.android.view.hideKeyboard
|
||||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.SecureFragment
|
||||
import org.mozilla.fenix.databinding.FragmentCreditCardEditorBinding
|
||||
@ -82,10 +83,11 @@ class CreditCardEditorFragment : SecureFragment(R.layout.fragment_credit_card_ed
|
||||
}
|
||||
|
||||
/**
|
||||
* Close any open dialogs or menus and reauthenticate if the fragment is paused and
|
||||
* the user is not navigating to [CreditCardsManagementFragment].
|
||||
* Close the keyboard, any open dialogs or menus and then reauthenticate if the
|
||||
* fragment is paused and the user is not navigating to [CreditCardsManagementFragment].
|
||||
*/
|
||||
override fun onPause() {
|
||||
view?.hideKeyboard()
|
||||
menu.close()
|
||||
|
||||
redirectToReAuth(
|
||||
|
Loading…
Reference in New Issue
Block a user