summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scene/gui/control.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index 1fdc30eb6d..1d988cd7d0 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -589,6 +589,7 @@ void Control::_notification(int p_notification) {
_size_changed();
} break;
case NOTIFICATION_EXIT_TREE: {
+ release_focus();
get_viewport()->_gui_remove_control(this);
} break;
case NOTIFICATION_READY: {