Skip to content

fix: handle unavailable clipboard API in Share modal - #1170

Open
nirmalaravind023-droid wants to merge 1 commit into
drawdb-io:mainfrom
nirmalaravind023-droid:fix/share-copy-link
Open

nirmalaravind023-droid wants to merge 1 commit into
drawdb-io:mainfrom
nirmalaravind023-droid:fix/share-copy-link

Conversation

@nirmalaravind023-droid

Copy link
Copy Markdown

Fixes a potential issue where the Share modal's Copy Link button fails when the Clipboard API is unavailable.

The existing copyLink function calls navigator.clipboard.writeText() directly.

In non-secure HTTP environments, navigator.clipboard may be undefined, causing a synchronous TypeError that bypasses the existing promise rejection handler.

Changes

Added a check for Clipboard API availability.

Added a fallback using a temporary textarea and document.execCommand("copy").

Preserved success and error toast handling.
Only src/components/EditorHeader/Modal/Share.jsx was modified.

This fix does not address separate backend-related errors during share-link generation.

@vercel

vercel Bot commented Oct 13, 2026

Copy link
Copy Markdown

@nirmalaravind023-droid is attempting to deploy a commit to the dottle's projects Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
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