Skip to content

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

Merged
pqoqubbw merged 1 commit intomintlify:mainfrom
20syldev:fix/accordion-clipboard-on-open
May 1, 2026
Merged

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

Conversation

@20syldev
Copy link
Copy Markdown
Contributor

@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.

Copy link
Copy Markdown
Contributor

@pqoqubbw pqoqubbw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@pqoqubbw pqoqubbw merged commit 7710082 into mintlify:main May 1, 2026
3 checks passed
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.

2 participants