mirror of https://github.com/godotengine/godot
Merge pull request #9281 from Zylann/fix_freelook_keyboard
Fixed freelook conflict with text inputs
This commit is contained in:
commit
68891baa1b
|
|
@ -775,6 +775,11 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &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: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue