Skip to content

Commit

Permalink
Merge pull request #79079 from stmSi/ESC-key-not-closing-FindReplaceBar
Browse files Browse the repository at this point in the history
Fix ESC (ui_cancel) not closing FindReplaceBar
  • Loading branch information
YuriSizov committed Jul 12, 2023
2 parents 5167bed + 7eb517c commit ecc9134
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion editor/code_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit ecc9134

Please sign in to comment.