fix: context menu icons only appear on first open

useEffect watching [activeTool, activeTab] runs createIcons()
but contextMenu is NOT in deps. On first right-click, if
activeTool/activeTab also change (e.g. timeline click), the
effect fires and icons appear. Subsequent right-clicks don't
change activeTool/activeTab, so createIcons() never runs for
the new context menu DOM.

Fix: add contextMenu to useEffect dependency array.
This commit is contained in:
2026-07-27 21:35:53 +07:00
parent 74992f7b55
commit 430e87445e
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -7483,7 +7483,7 @@ const App = () => {
window.lucide.createIcons();
}
}, 50);
}, [activeTool, activeTab]);
}, [activeTool, activeTab, contextMenu]);
const timelineWrapperRef = useRef(null);
const [timelineWrapperNode, setTimelineWrapperNode] = useState(null);
const handleTimelineWrapperRef = useCallback(node => {