diff --git a/tldraw/apps/tldraw-logseq/src/components/ContextBar/ContextBar.tsx b/tldraw/apps/tldraw-logseq/src/components/ContextBar/ContextBar.tsx index 42f567689..7bf907e95 100644 --- a/tldraw/apps/tldraw-logseq/src/components/ContextBar/ContextBar.tsx +++ b/tldraw/apps/tldraw-logseq/src/components/ContextBar/ContextBar.tsx @@ -40,10 +40,12 @@ const _ContextBar: TLContextBarComponent = ({ shapes, offsets }) => { }, []) React.useLayoutEffect(() => { - const elm = rContextBar.current - if (!elm) return - const { offsetWidth, offsetHeight } = elm - rSize.current = [offsetWidth, offsetHeight] + setTimeout(() => { + const elm = rContextBar.current + if (!elm) return + const { offsetWidth, offsetHeight } = elm + rSize.current = [offsetWidth, offsetHeight] + }) }) React.useLayoutEffect(() => {