Skip to content

Restore gesture requirement for async clipboard write access #16890

@ShivanKaul

Description

@ShivanKaul

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)

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions