Closes #1422 - Do not hide keyboard on pause
parent
5fc1e9227f
commit
a0c4acd4c6
|
@ -4,13 +4,11 @@
|
|||
|
||||
package org.mozilla.fenix
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.util.AttributeSet
|
||||
import android.view.View
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import androidx.navigation.fragment.NavHostFragment
|
||||
|
@ -114,19 +112,6 @@ open class HomeActivity : AppCompatActivity() {
|
|||
super.onBackPressed()
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
super.onPause()
|
||||
hideSoftwareKeyboard()
|
||||
}
|
||||
|
||||
private fun hideSoftwareKeyboard() {
|
||||
(getSystemService(Activity.INPUT_METHOD_SERVICE) as InputMethodManager).apply {
|
||||
currentFocus?.also {
|
||||
this.hideSoftInputFromWindow(it.windowToken, 0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleCrashIfNecessary(intent: Intent?) {
|
||||
if (intent == null) { return }
|
||||
if (!Crash.isCrashIntent(intent)) { return }
|
||||
|
|
Loading…
Reference in New Issue