Skip to content

Commit

Permalink
Fix double/triple click selection issues on headings (#8015)
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Swithinbank <357379+delucis@users.noreply.github.com>
Co-authored-by: Reuben Tier <64310361+TheOtterlord@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
  • Loading branch information
4 people committed May 1, 2024
1 parent 4776ac0 commit 52fd745
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/starlight/MarkdownContent.astro
Expand Up @@ -166,6 +166,12 @@ const { entry } = Astro.props;
width: var(--icon-size);
}

/* Prevent double or triple clicks from potentially selecting the anchor link a11y text. */
.sl-markdown-content :global(.anchor-link .sr-only) {
-webkit-user-select: none;
user-select: none;
}

@media (hover: hover) {
.sl-markdown-content :global(.anchor-link) {
opacity: 0;
Expand Down

0 comments on commit 52fd745

Please sign in to comment.