Fix Ref Mutations in EditorScene.tsx #6
Labels
No labels
blocked:needs-decision
bug
component:editor
component:hero
priority:p2
priority:p3
priority:p4
quickfix
test-coverage
triage-approved
type:bug
type:enhancement
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/kimi_agent_hero_forge_slice_issue#6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Direct mutation of
gl.domElement.style.cursorandgl.localClippingEnabledviolates React hooks immutability rules.Files/Lines:
src/pages/editor/EditorScene.tsx:267-gl.domElement.style.cursor = "grabbing"src/pages/editor/EditorScene.tsx:305-gl.domElement.style.cursor = "default"src/pages/editor/EditorScene.tsx:371-gl.domElement.style.cursor = "grab"src/pages/editor/EditorScene.tsx:374-gl.domElement.style.cursor = "default"src/pages/editor/EditorScene.tsx:850-gl.localClippingEnabled = trueFix: Use refs for DOM mutations, or use
useLayoutEffectwith proper cleanup.