diff options
| author | Jay V <[email protected]> | 2025-07-03 20:30:17 -0400 |
|---|---|---|
| committer | Jay V <[email protected]> | 2025-07-03 20:30:21 -0400 |
| commit | 167a9dcaf312c2ceda2ed43e0adecf33d5e98c60 (patch) | |
| tree | 4db6e8b591774010d8f36090c30d4df25c3517a9 /packages | |
| parent | 37327259cb3182f2e8594d0b95d6f189cc6a2d0a (diff) | |
| download | opencode-167a9dcaf312c2ceda2ed43e0adecf33d5e98c60.tar.gz opencode-167a9dcaf312c2ceda2ed43e0adecf33d5e98c60.zip | |
docs: share fix scroll to anchor
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/web/src/components/Share.tsx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/web/src/components/Share.tsx b/packages/web/src/components/Share.tsx index e1981100e..ff838dabe 100644 --- a/packages/web/src/components/Share.tsx +++ b/packages/web/src/components/Share.tsx @@ -957,7 +957,12 @@ export default function Share(props: { onMount(() => { const hash = window.location.hash.slice(1) - if (hash !== "" && hash === anchor()) { + // Wait till all parts are loaded + if ( + hash !== "" + && msg.parts.length === partIndex() + 1 + && data().messages.length === msgIndex() + 1 + ) { scrollToAnchor(hash) } }) |
