1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Fix: ESC (ui_cancel) not closing FindReplaceBar

(cherry picked from commit 7eb517c27f)
This commit is contained in:
stmSi
2023-07-06 03:35:01 +06:30
committed by Yuri Sizov
parent c1ddd0485b
commit 74efa063cc

View File

@@ -126,7 +126,7 @@ void FindReplaceBar::unhandled_input(const Ref<InputEvent> &p_event) {
if (k.is_valid() && k->is_action_pressed(SNAME("ui_cancel"), false, true)) {
Control *focus_owner = get_viewport()->gui_get_focus_owner();
if (text_editor->has_focus() || (focus_owner && vbc_lineedit->is_ancestor_of(focus_owner))) {
if (text_editor->has_focus() || (focus_owner && is_ancestor_of(focus_owner))) {
_hide_bar();
accept_event();
}