make sure to ahve focus before sending keys

This commit is contained in:
Fabian Freund
2026-03-11 15:18:14 +01:00
parent f2fbd24123
commit e04c884f9b
@@ -252,6 +252,10 @@ class GeckoSessionApiImpl : GeckoSessionApi {
?: throw IllegalStateException("No active engine view")
val view = engineView.asView()
if (!view.hasFocus()) {
view.requestFocus()
}
val downEvent = android.view.KeyEvent(
android.view.KeyEvent.ACTION_DOWN, keyCode.toInt()
)