From 0fd66a4f8fd12562f4bbad391f87ccc97e3784af Mon Sep 17 00:00:00 2001 From: Marc Gilleron Date: Tue, 20 Jun 2017 02:24:35 +0200 Subject: [PATCH] Fixed freelook conflict with text inputs --- editor/plugins/spatial_editor_plugin.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index 2d27e218ece..c55bef1b034 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -775,6 +775,11 @@ void SpatialEditorViewport::_sinput(const Ref &p_event) { } freelook_active = b->is_pressed(); + if (freelook_active && !surface->has_focus()) { + // Focus usually doesn't trigger on right-click, but in case of freelook it should, + // otherwise using keyboard navigation would misbehave + surface->grab_focus(); + } } break; case BUTTON_MIDDLE: {