Skip to content

The ClipboardItem check in copy link is always true #3863

Closed

Description

@AlexAndBear

Initial Checklist

  • I understand this is a bug report and questions should be posted in the Community Discussions
  • I searched issues and couldn’t find anything (or linked relevant results below)

Bug Description

The check in useCopyLink that decides whether the ClipboardItem path can be used is always true on its first part: typeof ClipboardItem && navigator.clipboard.write (packages/web-pkg/src/composables/links/useCopyLink.ts). typeof returns a non-empty string even when ClipboardItem does not exist, and navigator.clipboard is undefined outside a secure context.

Reproduction Steps

  1. Use a browser without ClipboardItem, or open the web UI in an insecure context (plain HTTP, not localhost).
  2. Create a public link for a file.

Expected Outcome

The link is created. Without ClipboardItem the fallback copy is used; without clipboard access the link is still created.

Actual Outcome

Without ClipboardItem, new ClipboardItem throws and the link is reported as not copied. Without navigator.clipboard, the check throws before the link is created.

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions