Fix FOCUS_ACCESSIBILITY grabbing focus when it is not supposed to, forward GraphNode key input to GraphEdit.

This commit is contained in:
Pāvels Nadtočajevs
2025-04-20 20:30:34 +03:00
parent e37c6261ea
commit db0c0a9182
6 changed files with 21 additions and 4 deletions

View File

@@ -1933,7 +1933,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
while (ci) {
Control *control = Object::cast_to<Control>(ci);
if (control) {
if (control->get_focus_mode_with_override() != Control::FOCUS_NONE) {
if (control->_is_focusable()) {
// Grabbing unhovered focus can cause issues when mouse is dragged
// with another button held down.
if (control != gui.key_focus && gui.mouse_over_hierarchy.has(control)) {