From 3b75aa08fcecb86de2e6f71c3ca383a179e74dc1 Mon Sep 17 00:00:00 2001 From: KOGA Mitsuhiro Date: Mon, 13 Apr 2026 23:56:25 +0900 Subject: [PATCH] Fix BaseButton popup unresponsive on touchscreen after first tap --- scene/gui/base_button.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp index 31bf964729..a79c100360 100644 --- a/scene/gui/base_button.cpp +++ b/scene/gui/base_button.cpp @@ -67,7 +67,7 @@ void BaseButton::gui_input(const Ref &p_event) { return; } - if (p_event->is_pressed()) { + if (p_event->is_pressed() && status.touch_index == -1) { status.device_id = p_event->get_device(); } @@ -267,6 +267,7 @@ void BaseButton::on_action_event(Ref p_event) { if (action_mode == ACTION_MODE_BUTTON_PRESS) { status.press_attempt = false; status.pressing_inside = false; + status.touch_index = -1; // Action completed, release matching touch so later taps aren't dropped if a modal consumes the release. } status.pressed = !status.pressed; _unpress_group();