- From: mbrodesser <notifications@github.com>
- Date: Wed, 06 Apr 2022 01:36:26 -0700
- To: w3c/clipboard-apis <clipboard-apis@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/clipboard-apis/issues/75/1090002610@github.com>
> The immediate explanation for this limitation is that we (WebKit) use the same `UserGestureIndicator` check here that we use in other places that require user activation (such as showing UI for file pickers). This means that the user gesture indicator should be propagated through `setTimeout` and fetch requests, for up to 1 second, but _otherwise_ only persists during the scope of handling a user activation event (e.g. `click` or `touchstart`/`touchend`). > @whsieh thanks for the explanation. > I think we could probably relax this constraint, such that the "user interaction" is valid as long as: > > 1. We handled a user activation event recently (probably, at most ~1 sec. ago?). In Gecko/Firefox it's currently 5 seconds (https://searchfox.org/mozilla-central/rev/cf77e656ef36453e154bd45a38eea08b13d6a53e/modules/libpref/init/StaticPrefList.yaml#3775-3778). > > 2. The browser tab hasn't been backgrounded. > > 3. Nothing else has attempted to write to the clipboard in the meantime. The third point refers to `clipboard.write()` and `clipboard.writeText()` only and not to `read()` and `readText()`, correct? With "Nothing else", do you mean no other script? Presumably native applications could always write (already now in Safari). If this was indeed only about `write()` and `writeText()` I wonder if 2. and 3. are indeed necessary. -- Reply to this email directly or view it on GitHub: https://github.com/w3c/clipboard-apis/issues/75#issuecomment-1090002610 You are receiving this because you are subscribed to this thread. Message ID: <w3c/clipboard-apis/issues/75/1090002610@github.com>
Received on Wednesday, 6 April 2022 08:36:38 UTC