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:
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user