Skip to content

Interoperability issue: navigator.clipboard.write() and navigator.clipboard.writeText() user gesture requirement #182

@tomayac

Description

@tomayac

(This was brought up in the context of @simevidas' tweet.)

When attempting to write to the clipboard via either of navigator.clipboard.write() or navigator.clipboard.writeText() , both Safari 🚫 and Firefox 🚫 require a user gesture:

image

In contrast, and this is the interoperability issue I guess, Chrome ✅ happily proceeds. Brave, based on Chromium, considered disabling this behavior (brave/brave-browser#16890).

One use case requiring a user gesture would break is that of remote clipboard synchronization, which is explicitly mentioned in the spec. Maybe Capability Delegation could be the answer here?!

Here's a test page for write() courtesy of Šime, and here's a test page for writeText() (based on Šime's).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions