diff options
-rw-r--r-- | scene/main/viewport.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 1ff1f4b6d8..cb5a895574 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -2017,6 +2017,9 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) { top->notification(Control::NOTIFICATION_MODAL_CLOSE); top->_modal_stack_remove(); top->hide(); + // Close modal, set input as handled + get_tree()->set_input_as_handled(); + return; } } |