Skip to content

playground: Share button says Copied! before actually copying, then fails if you tab away too fast #21691

@injust

Description

@injust

Summary

The Share button shows "Copied!" before it actually copies.

If you press Share, then tab away as soon as you see "Copied!", it will not copy. The console shows this error:

Failed to share playground: NotAllowedError: Failed to execute 'writeText' on 'Clipboard': Document is not focused.
(anonymous) @ index-BGT7xqC_.js:1033
Promise.catch
(anonymous) @ index-BGT7xqC_.js:1033
onClick @ index-BGT7xqC_.js:54
kX @ index-BGT7xqC_.js:49
(anonymous) @ index-BGT7xqC_.js:49
AK @ index-BGT7xqC_.js:49
q3 @ index-BGT7xqC_.js:49
o9 @ index-BGT7xqC_.js:50
kbe @ index-BGT7xqC_.js:50

Version

No response

Metadata

Metadata

Assignees

Labels

help wantedContributions especially welcomeplaygroundA playground-specific issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions