Skip to content

[BUG] fix: add catch handler for clipboard writeText in handleCopyLink #1227

@ask-z4ch

Description

@ask-z4ch

Description

The "Copy Link" button in VideoEditor triggers navigator.clipboard.writeText() without a .catch() handler. If the clipboard API rejects (permission denied, not served over HTTPS, browser focus lost), the promise rejection goes unhandled.

Steps to Reproduce

  1. Open the editor and upload a video.
  2. Make any edit.
  3. Click "Copy Link" while clipboard permission is denied (or served over HTTP, not HTTPS).
  4. Observe the unhandled promise rejection in console.

Expected Behavior

If clipboard access fails, the error should be caught and logged gracefully, matching the existing pattern at line 661.

Actual Behavior

Unhandled promise rejection: DOMException - Clipboard write failed

Additional Context

The same file already handles this correctly for the "Copy error" button at line 658-663:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working correctlytype:bugBug fix

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions