We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 825ef23 commit 2273c10Copy full SHA for 2273c10
scene/main/viewport.cpp
@@ -1903,6 +1903,10 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
1903
}
1904
MouseButtonMask button_mask = mouse_button_to_mask(mb->get_button_index());
1905
if (!gui.mouse_focus_mask.is_empty() && !gui.mouse_focus_mask.has_flag(button_mask)) {
1906
+ if (!gui.mouse_focus) {
1907
+ return;
1908
+ }
1909
+
1910
// Do not steal mouse focus and stuff while a focus mask without the current mouse button exists.
1911
gui.mouse_focus_mask.set_flag(button_mask);
1912
} else {
0 commit comments