Improve pointer lock handling and event listener setup in navigation controller

This commit is contained in:
2026-04-27 18:56:00 +02:00
parent 6bde5cd622
commit 2f811cdd24
2 changed files with 12 additions and 6 deletions

View File

@@ -4899,9 +4899,7 @@ export function App({ store, initialStatusMessage }: AppProps) {
return;
}
const pointerCaptured =
activeNavigationMode === "firstPerson" &&
firstPersonTelemetry?.pointerLocked === true;
const pointerCaptured = firstPersonTelemetry?.pointerLocked === true;
if (pointerCaptured) {
return;
@@ -4916,7 +4914,7 @@ export function App({ store, initialStatusMessage }: AppProps) {
return () => {
window.removeEventListener("keydown", handleWindowKeyDown);
};
}, [activeNavigationMode, editorState.toolMode, firstPersonTelemetry]);
}, [editorState.toolMode, firstPersonTelemetry]);
const applyProjectName = () => {
const normalizedName = projectNameDraft.trim() || DEFAULT_PROJECT_NAME;