Skip to content

Commit b225961

Browse files
committed
fix link menu not showing up on scroll
1 parent 3491bff commit b225961

2 files changed

Lines changed: 13 additions & 9 deletions

File tree

src/lib/components/ArticleCard.svelte

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -759,12 +759,14 @@
759759
{/if}
760760

761761
{#if linkInterception.menuState}
762-
<LinkContextMenu
763-
url={linkInterception.menuState.url}
764-
linkText={linkInterception.menuState.linkText}
765-
anchorRect={linkInterception.menuState.anchorRect}
766-
onClose={linkInterception.closeMenu}
767-
/>
762+
{#key linkInterception.menuState.url + linkInterception.menuState.anchorRect.top}
763+
<LinkContextMenu
764+
url={linkInterception.menuState.url}
765+
linkText={linkInterception.menuState.linkText}
766+
anchorRect={linkInterception.menuState.anchorRect}
767+
onClose={linkInterception.closeMenu}
768+
/>
769+
{/key}
768770
{/if}
769771

770772
{#if highlights.popoverState}

src/lib/components/feed/SavedReader.svelte

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -414,16 +414,18 @@
414414
onClose={() => (tagMenuOpen = false)}
415415
/>
416416
{/if}
417+
</header>
417418

418-
{#if linkInterception.menuState}
419+
{#if linkInterception.menuState}
420+
{#key linkInterception.menuState.url + linkInterception.menuState.anchorRect.top}
419421
<LinkContextMenu
420422
url={linkInterception.menuState.url}
421423
linkText={linkInterception.menuState.linkText}
422424
anchorRect={linkInterception.menuState.anchorRect}
423425
onClose={linkInterception.closeMenu}
424426
/>
425-
{/if}
426-
</header>
427+
{/key}
428+
{/if}
427429

428430
{#if styleMenuOpen}
429431
<div class="style-toolbar-fixed">

0 commit comments

Comments
 (0)