From e90a337fa323cd8169da5533314185d3f170729d Mon Sep 17 00:00:00 2001 From: Giganzo <158825920+Giganzo@users.noreply.github.com> Date: Wed, 24 Sep 2025 16:51:59 +0200 Subject: [PATCH] Fix SpinBox stepper grabbing focus state on mouse input --- scene/gui/spin_box.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp index 429040563e3..1935336edba 100644 --- a/scene/gui/spin_box.cpp +++ b/scene/gui/spin_box.cpp @@ -257,7 +257,7 @@ void SpinBox::gui_input(const Ref &p_event) { switch (mb->get_button_index()) { case MouseButton::LEFT: { accepted = true; - line_edit->grab_focus(); + line_edit->grab_focus(true); if (mouse_on_up_button || mouse_on_down_button) { // Arrow button is being pressed. Snap the value to next step. @@ -281,7 +281,7 @@ void SpinBox::gui_input(const Ref &p_event) { drag.capture_pos = mb->get_position(); } break; case MouseButton::RIGHT: { - line_edit->grab_focus(); + line_edit->grab_focus(true); if (mouse_on_up_button || mouse_on_down_button) { set_value(mouse_on_up_button ? get_max() : get_min()); }