- From: Thomas Steiner <notifications@github.com>
- Date: Thu, 11 Aug 2022 06:50:26 -0700
- To: w3c/clipboard-apis <clipboard-apis@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 11 August 2022 13:50:38 UTC
(This was brought up in the context of @simevidas' [tweet](https://twitter.com/simevidas/status/1557626100972404736).) 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](https://user-images.githubusercontent.com/145676/184145734-0478c5c0-c299-475b-8dcf-d4fda33a54ea.png) In contrast, and this is the interoperability issue I guess, **Chrome** ✅ happily proceeds. **Brave**, based on Chromium, considered disabling this behavior (https://github.com/brave/brave-browser/issues/16890). One use case requiring a user gesture would break is that of remote clipboard synchronization, which is [explicitly mentioned in the spec](https://w3c.github.io/clipboard-apis/#remote-clipboard-sync). Maybe [Capability Delegation](https://github.com/WICG/capability-delegation) could be the answer here?! Here's a [test page for `write()`](https://output.jsbin.com/yuliwoz/quiet) courtesy of Šime, and here's a [test page for `writeText()`](https://fluoridated-showy-fog.glitch.me/) (based on Šime's). -- Reply to this email directly or view it on GitHub: https://github.com/w3c/clipboard-apis/issues/182 You are receiving this because you are subscribed to this thread. Message ID: <w3c/clipboard-apis/issues/182@github.com>
Received on Thursday, 11 August 2022 13:50:38 UTC