Skip to content

fix(accordion): remove unintended clipboard copy on open#234

Open
20syldev wants to merge 1 commit intomintlify:mainfrom
20syldev:fix/accordion-clipboard-on-open
Open

fix(accordion): remove unintended clipboard copy on open#234
20syldev wants to merge 1 commit intomintlify:mainfrom
20syldev:fix/accordion-clipboard-on-open

Conversation

@20syldev
Copy link
Copy Markdown

@20syldev 20syldev commented Apr 26, 2026

Summary

Fixes #27 (reported on mintlify/mdx#27).

Clicking an accordion to expand/collapse it was silently overwriting the user's clipboard with the current URL + hash fragment. This behavior was unexpected and disruptive — especially when the user had something else copied.

  • Removed the copyToClipboard(newUrl) call in updateAndCopy
  • Removed the now-unused copyToClipboard import
  • The URL hash is still updated via window.history.replaceState so deep-linking to open accordions continues to work

Note

Low Risk
Removes an unintended clipboard write during accordion URL management; behavior change is limited to client-side UX and should not affect data or security.

Overview
Accordion URL management no longer copies the generated deep-link URL into the user’s clipboard when sections are opened/closed.

The unused copyToClipboard import is removed, and URL updates continue to happen via window.history.replaceState so hash-based deep linking still works.

Reviewed by Cursor Bugbot for commit 5dbca8c. Bugbot is set up for automated code reviews on this repo. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant