From 7eb517c27f154566d9b4e45c2102577c6029d066 Mon Sep 17 00:00:00 2001 From: stmSi Date: Thu, 6 Jul 2023 03:35:01 +0630 Subject: [PATCH] Fix: ESC (ui_cancel) not closing FindReplaceBar --- editor/code_editor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index b48bd4ab5fa..80ad3180795 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -126,7 +126,7 @@ void FindReplaceBar::unhandled_input(const Ref &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(); }