godot
godot copied to clipboard
Middle mouse button interactions in 3D viewport do not focus it (but left and right mouse buttons do)
Tested versions
Reproducible in 4.4.1.stable, 4.5.dev3
System information
Godot v4.5.dev3 - Windows 11 (build 26100) - Multi-window, 1 monitor - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1660 SUPER (NVIDIA; 32.0.15.7652) - Intel(R) Core(TM) i7-10700F CPU @ 2.90GHz (16 threads)
Issue description
When you use the middle mouse button to orbit/pan in a 3D viewport, or use the mouse wheel to zoom, it does not focus the viewport. This is very frustrating because pressing any follow-up hotkeys intended for the viewport (e.g. changing view, changing transform gizmo type, toggling local-space) can end up being consumed by whatever was focused previously, such as a text field, or the Shader Editor, etc. The reason why this is such a common issue that isn't easy to work around is because using the right mouse button to change the viewport view does focus the viewport, and so do things like left-clicking on the viewport view widget. The middle mouse button is the only exception, despite the intended actions all being the same (changing the view).
Steps to reproduce
- Open up any Godot project, and have the 3D viewport open.
- Click on the
Filter Filesbox in theFileSystemtab. - Use the right mouse button to drag and look around in the 3D viewport.
- Use any hotkey intended for the viewport (e.g.
1for front view,Tfor toggling local space). Notice that the hotkey succeeds. - Now click on the
Filter Filesbox in theFileSystemtab again. - Use the middle mouse button to drag the view in the 3D viewport.
- Use the same hotkey as before. Notice that this time, the characters are being inputted into the
Filter Filesbox, instead of being consumed by the airport.
Minimal reproduction project (MRP)
N/A