Invalidate key focus if not visible, fixes #5354
This commit is contained in:
parent
db9335f4c1
commit
3185ce64c5
1 changed files with 6 additions and 1 deletions
|
@ -2058,7 +2058,12 @@ void Viewport::_gui_input_event(InputEvent p_event) {
|
|||
case InputEvent::JOYSTICK_BUTTON:
|
||||
case InputEvent::KEY: {
|
||||
|
||||
if (gui.key_focus) {
|
||||
if (gui.key_focus && !gui.key_focus->is_visible()) {
|
||||
//key focus must always be visible
|
||||
gui.key_focus->release_focus();
|
||||
}
|
||||
|
||||
if (gui.key_focus) {
|
||||
|
||||
gui.key_event_accepted=false;
|
||||
if (gui.key_focus->can_process()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue