diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp index a0c8f7c91f27..8a7f3c67a92c 100644 --- a/scene/gui/spin_box.cpp +++ b/scene/gui/spin_box.cpp @@ -249,6 +249,9 @@ void SpinBox::_notification(int p_what) { _update_text(); } break; + case NOTIFICATION_VISIBILITY_CHANGED: + drag.allowed = false; + [[fallthrough]]; case NOTIFICATION_EXIT_TREE: { _release_mouse(); } break;