From 147de75e521ed5a075a04bd3ae75e6b5156ddb29 Mon Sep 17 00:00:00 2001 From: necrashter Date: Mon, 26 Dec 2022 11:58:32 +0300 Subject: [PATCH] Set touch input as handled only after _gui_call_input --- scene/main/viewport.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 81f51ce882a..d9637df1109 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -2329,8 +2329,8 @@ void Viewport::_gui_input_event(Ref p_event) { } touch_event->set_position(pos); _gui_call_input(over, touch_event); + set_input_as_handled(); } - set_input_as_handled(); return; } } else { @@ -2346,8 +2346,8 @@ void Viewport::_gui_input_event(Ref p_event) { touch_event->set_position(pos); _gui_call_input(over, touch_event); + set_input_as_handled(); } - set_input_as_handled(); gui.touch_focus.erase(touch_index); return; }