1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-17 14:11:06 +00:00

FIX CodeTextEditor not respecting focus in _input

This commit is contained in:
MrRevington
2020-04-25 17:28:22 +02:00
parent 9239412027
commit 4641fb9ec4

View File

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