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.
2 parents eafc21f + 2273c10 commit 462a8d6Copy full SHA for 462a8d6
scene/main/viewport.cpp
@@ -1902,6 +1902,10 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
1902
}
1903
MouseButtonMask button_mask = mouse_button_to_mask(mb->get_button_index());
1904
if (!gui.mouse_focus_mask.is_empty() && !gui.mouse_focus_mask.has_flag(button_mask)) {
1905
+ if (!gui.mouse_focus) {
1906
+ return;
1907
+ }
1908
+
1909
// Do not steal mouse focus and stuff while a focus mask without the current mouse button exists.
1910
gui.mouse_focus_mask.set_flag(button_mask);
1911
} else {
0 commit comments