When rotating the camera in the viewport while it is undocked, the camera keeps snapping to its original position. It does not respect the fact that the viewport is undocked. Furthermore, after it is undocked, we can still rotate the camera by interacting with the gray background.
Reproduction steps:
Undock the viewport
Rotate the camera by right clicking and moving the mouse
The issue is the Editor uses mouse positions within the GLFW window to compute the camera's new orientation. What has to change is to use ImGUI's functions instead.
When rotating the camera in the viewport while it is undocked, the camera keeps snapping to its original position. It does not respect the fact that the viewport is undocked. Furthermore, after it is undocked, we can still rotate the camera by interacting with the gray background.
Reproduction steps: