Refactor pointer capture logic and clean up dependencies in App.tsx

This commit is contained in:
2026-04-27 17:20:13 +02:00
parent 4befb7a0ce
commit 3186c1dab5

View File

@@ -4896,9 +4896,7 @@ export function App({ store, initialStatusMessage }: AppProps) {
return;
}
const pointerCaptured =
activeNavigationMode === "firstPerson" &&
firstPersonTelemetry?.pointerLocked === true;
const pointerCaptured = firstPersonTelemetry?.pointerLocked === true;
if (pointerCaptured) {
return;
@@ -4913,7 +4911,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;