Merge pull request #37839 from MrRevington/3.2-_input_focus_check

FIX CodeTextEditor not respecting focus in _input
This commit is contained in:
Rémi Verschelde 2020-06-03 22:49:45 +02:00 committed by GitHub
commit 19dc5c42d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -657,7 +657,7 @@ FindReplaceBar::FindReplaceBar() {
// be handled too late if they weren't handled here.
void CodeTextEditor::_input(const Ref<InputEvent> &event) {
const Ref<InputEventKey> key_event = event;
if (!key_event.is_valid() || !key_event->is_pressed()) {
if (!key_event.is_valid() || !key_event->is_pressed() || !text_editor->has_focus()) {
return;
}