Skip to content

Creating several links at once overwrites the clipboard with empty text #3864

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

When several links are created at once, or link creation fails with an error other than 400, useCopyLink still writes a ClipboardItem built from an empty text (getTextToCopy returns an empty string in these cases). Whatever the user had in the clipboard before is replaced by an empty string.

Reproduction Steps

  1. Copy some text to the clipboard.
  2. Select several files and create links for all of them at once (or let the link creation fail with a server error).
  3. Paste.

Expected Outcome

The clipboard keeps its previous content when there is no single link to copy.

Actual Outcome

The clipboard is empty.

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