use exact match when checking focus next / previous

(cherry picked from commit c27b05febb)
This commit is contained in:
Nathan Franke 2022-02-09 10:18:58 -06:00 committed by Rémi Verschelde
parent 4f86249d1e
commit 4ef3985dc3
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -2454,11 +2454,11 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
next = from->_get_focus_neighbour(MARGIN_BOTTOM);
}
} else {
if (p_event->is_action_pressed("ui_focus_next", true)) {
if (p_event->is_action_pressed("ui_focus_next", true, true)) {
next = from->find_next_valid_focus();
}
if (p_event->is_action_pressed("ui_focus_prev", true)) {
if (p_event->is_action_pressed("ui_focus_prev", true, true)) {
next = from->find_prev_valid_focus();
}