fix: keep Android keyboard sessions open

This commit is contained in:
Alexander Sellite 2026-08-16 23:04:07 -04:00
parent 80c570657b
commit d8c8886216
2 changed files with 8 additions and 19 deletions

View file

@ -299,16 +299,22 @@ func _validate_native_keyboard() -> void:
character_event.unicode = 97
character_event.pressed = true
keyboard.call("_input", character_event)
outside_button.grab_focus()
await process_frame
assert(edit.has_focus())
outside_button.grab_focus()
await process_frame
assert(outside_button.has_focus())
edit.grab_focus()
var backspace_event := InputEventKey.new()
backspace_event.keycode = KEY_BACKSPACE
backspace_event.pressed = true
keyboard.call("_input", backspace_event)
outside_button.grab_focus()
await process_frame
assert(edit.has_focus())
outside_button.grab_focus()
await process_frame
assert(outside_button.has_focus())
edit.grab_focus()
var close_event := InputEventJoypadButton.new()
close_event.button_index = JOY_BUTTON_B
close_event.pressed = true