From 05eb33e70180002ad94f7cc38e689efb6d881e20 Mon Sep 17 00:00:00 2001 From: PucklaMotzer09 Date: Sun, 26 Dec 2021 17:53:07 +0100 Subject: [PATCH] Unfocus Control on NOTIFICATION_EXIT_TREE (cherry picked from commit be2d59fa0a77d60b19748a304fb74c386dd8e114) --- scene/gui/control.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 9acbdeeceea..97d507e7a12 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -472,7 +472,7 @@ void Control::_notification(int p_notification) { } break; case NOTIFICATION_EXIT_TREE: { ERR_FAIL_COND(!get_viewport()); - + release_focus(); get_viewport()->_gui_remove_control(this); } break;