question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Restore gesture requirement for async clipboard write access

See original GitHub issue

Chromium 66+ implements Asynchronous Clipboard API. Chromium, in contrast to Safari and Firefox, allow a website to write to the user’s clipboard using navigator.clipboard.writeText()/write() without a user gesture (only criteria is that the tab should be active).

We should require a user gesture (click, touch events) to enable use of navigator.clipboard.writeText() and navigator.clipboard.write(). Else, promise should reject.

Demo website that attempts to write to the user’s clipboard: https://shivankaul.com/brave/clipboard-paste.html (if you get a success message, try to paste)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
androolloydcommented, Aug 30, 2022

Am here to voice concern over this, its incredibly invasive and I would like to see it removed entirely from the Brave engine.

1reaction
markg85commented, Aug 28, 2022

Could this be re-evaluated? Personally i really don’t like this clipboard feature at all and want it gone in it’s entirety… That’s probably not going to happen so please put it behind a permission request at the very least.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unblocking clipboard access - web.dev
The Async Clipboard API addresses these issues, providing a well-defined permissions model that doesn't block the page. The Async Clipboard API ...
Read more >
'clipboard-write' is not a valid value for enumeration ...
So to be clear, you can already write to the clipboard with a user gesture, custom selection, and document.execCommand("copy") . Supporting writeText() and ......
Read more >
Clipboard API and events - W3C
Async Clipboard API - This API provides direct access to read and write the clipboard data. Since this is considered to be a...
Read more >
Async Clipboard API: Accessing the clipboard using JavaScript
The Async Clipboard API provides Web apps with the ability to programmatically read from and write to the system clipboard easily.
Read more >
Websites may write to the clipboard in Chrome without user ...
All Chromium-based browsers that are up to date are affected by this. Firefox and Safari do require a user gesture before websites may...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found