Refactor pointer capture logic and clean up dependencies in App.tsx
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user