Skip to content

Fix copy page button not working in Safari#5560

Merged
skshetry merged 2 commits intomainfrom
claude/fix-safari-copy-issue-2gQ0O
Apr 5, 2026
Merged

Fix copy page button not working in Safari#5560
skshetry merged 2 commits intomainfrom
claude/fix-safari-copy-issue-2gQ0O

Conversation

@skshetry
Copy link
Copy Markdown
Collaborator

@skshetry skshetry commented Apr 5, 2026

Safari requires clipboard writes to begin in the synchronous call stack
of a user gesture. The previous code awaited fetch() before calling
navigator.clipboard.writeText(), breaking the gesture chain. Use
ClipboardItem with a Promise so the clipboard write starts
synchronously while content resolves asynchronously.

https://claude.ai/code/session_018e1sgeEGsu8UsSYkq6tkfb

claude added 2 commits April 5, 2026 03:21
Safari requires clipboard writes to begin in the synchronous call stack
of a user gesture. The previous code awaited fetch() before calling
navigator.clipboard.writeText(), breaking the gesture chain. Use
ClipboardItem with a Promise<Blob> so the clipboard write starts
synchronously while content resolves asynchronously.

https://claude.ai/code/session_018e1sgeEGsu8UsSYkq6tkfb
Remove the ClipboardItem.supports check and writeText fallback. All
modern browsers support ClipboardItem with Promise<Blob>, and the
supports() method may not exist in older Safari versions that still
need the synchronous gesture fix.

https://claude.ai/code/session_018e1sgeEGsu8UsSYkq6tkfb
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@skshetry skshetry merged commit a9a933e into main Apr 5, 2026
2 of 3 checks passed
@skshetry skshetry deleted the claude/fix-safari-copy-issue-2gQ0O branch April 5, 2026 03:36
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.

3 participants