-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need a consistent set of events that defines user activation #3849
Comments
Chromium bug to track this: https://crbug.com/826293 |
FWIW, I'm convinced by the argument here that in addition to a standardized list of events, we should have some single API to be informed of when frame has been activated (to prevent developers from having to maintain a hard-coded list of events, etc.). In particular, the use case of starting the background music for a game is a good one - it's reasonable to want to do that as soon as the user has indicated any interaction, without necessarily caring what exact form that interaction comes in (eg. launching a PWA, or pressing a gamepad button which fires no dom events at all). |
Sorry, I missed @mustaqahmed's response in the WICG thread on this. Let's discuss this particular issue there in the WICG and come back here with any concrete proposal. |
This interop problem remains. I recently wrote some web platform tests that assumed pressing keys (using testdriver) was an activation-triggering event, but that was not correct according to the spec, even though it was true in Chrome. #6818 by @marcoscaceres is related; he is trying to add keypress and keyup, which at least according to @mustaqahmed's OP is a pretty complicated situation across browsers. For keyboard events in particular, there is a big question as to what should count. E.g. in WICG/close-watcher#7 (comment) we are discussing whether the Esc key should count as user activation. Consider a user who visits a page, and all they do is press Esc; should that let the page show popups or play unmuted video or enter fullscreen?? |
In Chrome, we stopped counting [Edit: fixed the link above!] |
Let's explore a way to fix the overall mess here. I am proposing to address the following three sub-problems independently, please let us know your thoughts on each of these (and possibly other) cases. A. Drop all high-level eventsThis should be the easiest one I believe: the current list of events include "high-level" events like B. Fine-tune low-level eventsThe list logically omits What other low-level events do we need to consider? What about C. Keyboard event trigger should be key-specificIt seems we reached the consensus that To test your favorite browser's behavior, you can try (or tweak) the "control case" in this repro. |
Overall that sounds reasonable to me. Probably any kind of browser accesskey you wouldn't want to count as activation? E.g., |
Agreed, that plan sounds great to me. |
We also found compatibility problems when we tried to remove Apple's WebKit port also includes |
I just sent out PR #7248, please take a look. This PR addressed A, B and most part of C in my plan above. I realized that my original plan (to independently fix the sub-problems) won't work because removing |
Related to HTML issue: whatwg/html#3849 Also fix double-activation in Chrome's gesture tap. Bug: 826293, 1265587 Change-Id: I3bc3bcbcfeda242512fb777a1c8881c475fed5fc
Related to HTML issue: whatwg/html#3849 Also fix double-activation in Chrome's gesture tap. Bug: 826293, 1265587 Change-Id: I3bc3bcbcfeda242512fb777a1c8881c475fed5fc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3254213 Reviewed-by: Robert Flack <[email protected]> Reviewed-by: Avi Drissman <[email protected]> Commit-Queue: Mustaq Ahmed <[email protected]> Cr-Commit-Position: refs/heads/main@{#940118}
Related to HTML issue: whatwg/html#3849 Also fix double-activation in Chrome's gesture tap. Bug: 826293, 1265587 Change-Id: I3bc3bcbcfeda242512fb777a1c8881c475fed5fc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3254213 Reviewed-by: Robert Flack <[email protected]> Reviewed-by: Avi Drissman <[email protected]> Commit-Queue: Mustaq Ahmed <[email protected]> Cr-Commit-Position: refs/heads/main@{#940118}
Related to HTML issue: whatwg/html#3849 Also fix double-activation in Chrome's gesture tap. Bug: 826293, 1265587 Change-Id: I3bc3bcbcfeda242512fb777a1c8881c475fed5fc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3254213 Reviewed-by: Robert Flack <[email protected]> Reviewed-by: Avi Drissman <[email protected]> Commit-Queue: Mustaq Ahmed <[email protected]> Cr-Commit-Position: refs/heads/main@{#940118}
This reverts commit 34b3146d8dfc1e44715703e4cf97779fc7c8688d. Reason for revert: Suspected cause of crbug.com/1269035, will verify before submitting. Original change's description: > Add a WPT for pointerevent user activation trigger. > > Related to HTML issue: whatwg/html#3849 > > Also fix double-activation in Chrome's gesture tap. > > Bug: 826293, 1265587 > Change-Id: I3bc3bcbcfeda242512fb777a1c8881c475fed5fc > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3254213 > Reviewed-by: Robert Flack <[email protected]> > Reviewed-by: Avi Drissman <[email protected]> > Commit-Queue: Mustaq Ahmed <[email protected]> > Cr-Commit-Position: refs/heads/main@{#940118} # Not skipping CQ checks because original CL landed > 1 day ago. Bug: 826293, 1265587 Change-Id: I4bc041f2254c382c00ce3596d61742ba84c79660
This reverts commit 34b3146d8dfc1e44715703e4cf97779fc7c8688d. Reason for revert: Suspected cause of crbug.com/1269035, will verify before submitting. Original change's description: > Add a WPT for pointerevent user activation trigger. > > Related to HTML issue: whatwg/html#3849 > > Also fix double-activation in Chrome's gesture tap. > > Bug: 826293, 1265587 > Change-Id: I3bc3bcbcfeda242512fb777a1c8881c475fed5fc > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3254213 > Reviewed-by: Robert Flack <[email protected]> > Reviewed-by: Avi Drissman <[email protected]> > Commit-Queue: Mustaq Ahmed <[email protected]> > Cr-Commit-Position: refs/heads/main@{#940118} # Not skipping CQ checks because original CL landed > 1 day ago. Bug: 826293, 1265587 Change-Id: I4bc041f2254c382c00ce3596d61742ba84c79660 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3277061 Reviewed-by: Brian Sheedy <[email protected]> Reviewed-by: Johann Koenig <[email protected]> Commit-Queue: Brian Sheedy <[email protected]> Commit-Queue: Johann Koenig <[email protected]> Owners-Override: Johann Koenig <[email protected]> Cr-Commit-Position: refs/heads/main@{#940996}
This reverts commit 34b3146d8dfc1e44715703e4cf97779fc7c8688d. Reason for revert: Suspected cause of crbug.com/1269035, will verify before submitting. Original change's description: > Add a WPT for pointerevent user activation trigger. > > Related to HTML issue: whatwg/html#3849 > > Also fix double-activation in Chrome's gesture tap. > > Bug: 826293, 1265587 > Change-Id: I3bc3bcbcfeda242512fb777a1c8881c475fed5fc > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3254213 > Reviewed-by: Robert Flack <[email protected]> > Reviewed-by: Avi Drissman <[email protected]> > Commit-Queue: Mustaq Ahmed <[email protected]> > Cr-Commit-Position: refs/heads/main@{#940118} # Not skipping CQ checks because original CL landed > 1 day ago. Bug: 826293, 1265587 Change-Id: I4bc041f2254c382c00ce3596d61742ba84c79660 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3277061 Reviewed-by: Brian Sheedy <[email protected]> Reviewed-by: Johann Koenig <[email protected]> Commit-Queue: Brian Sheedy <[email protected]> Commit-Queue: Johann Koenig <[email protected]> Owners-Override: Johann Koenig <[email protected]> Cr-Commit-Position: refs/heads/main@{#940996}
This reverts commit 34b3146. Reason for revert: Suspected cause of crbug.com/1269035, will verify before submitting. Original change's description: > Add a WPT for pointerevent user activation trigger. > > Related to HTML issue: whatwg/html#3849 > > Also fix double-activation in Chrome's gesture tap. > > Bug: 826293, 1265587 > Change-Id: I3bc3bcbcfeda242512fb777a1c8881c475fed5fc > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3254213 > Reviewed-by: Robert Flack <[email protected]> > Reviewed-by: Avi Drissman <[email protected]> > Commit-Queue: Mustaq Ahmed <[email protected]> > Cr-Commit-Position: refs/heads/main@{#940118} # Not skipping CQ checks because original CL landed > 1 day ago. Bug: 826293, 1265587 Change-Id: I4bc041f2254c382c00ce3596d61742ba84c79660 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3277061 Reviewed-by: Brian Sheedy <[email protected]> Reviewed-by: Johann Koenig <[email protected]> Commit-Queue: Brian Sheedy <[email protected]> Commit-Queue: Johann Koenig <[email protected]> Owners-Override: Johann Koenig <[email protected]> Cr-Commit-Position: refs/heads/main@{#940996}
Related to HTML issue: whatwg/html#3849 Bug: 826293 Change-Id: I9e4bc0df46df63e05dac64af32c1aab7cdabffe4
…on trigger., a=testonly Automatic update from web-platform-tests Add a WPT for pointerevent user activation trigger. Related to HTML issue: whatwg/html#3849 Also fix double-activation in Chrome's gesture tap. Bug: 826293, 1265587 Change-Id: I3bc3bcbcfeda242512fb777a1c8881c475fed5fc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3254213 Reviewed-by: Robert Flack <[email protected]> Reviewed-by: Avi Drissman <[email protected]> Commit-Queue: Mustaq Ahmed <[email protected]> Cr-Commit-Position: refs/heads/main@{#940118} -- wpt-commits: aa2fc4c2ddfac8b0870c0b075899478c9cabc0c2 wpt-pr: 31521
…activation trigger.", a=testonly Automatic update from web-platform-tests Revert "Add a WPT for pointerevent user activation trigger." This reverts commit 34b3146d8dfc1e44715703e4cf97779fc7c8688d. Reason for revert: Suspected cause of crbug.com/1269035, will verify before submitting. Original change's description: > Add a WPT for pointerevent user activation trigger. > > Related to HTML issue: whatwg/html#3849 > > Also fix double-activation in Chrome's gesture tap. > > Bug: 826293, 1265587 > Change-Id: I3bc3bcbcfeda242512fb777a1c8881c475fed5fc > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3254213 > Reviewed-by: Robert Flack <[email protected]> > Reviewed-by: Avi Drissman <[email protected]> > Commit-Queue: Mustaq Ahmed <[email protected]> > Cr-Commit-Position: refs/heads/main@{#940118} # Not skipping CQ checks because original CL landed > 1 day ago. Bug: 826293, 1265587 Change-Id: I4bc041f2254c382c00ce3596d61742ba84c79660 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3277061 Reviewed-by: Brian Sheedy <[email protected]> Reviewed-by: Johann Koenig <[email protected]> Commit-Queue: Brian Sheedy <[email protected]> Commit-Queue: Johann Koenig <[email protected]> Owners-Override: Johann Koenig <[email protected]> Cr-Commit-Position: refs/heads/main@{#940996} -- wpt-commits: eca3a50a442ab21283638efbf1617492924f5fdd wpt-pr: 31608
…on trigger., a=testonly Automatic update from web-platform-tests Add a WPT for pointerevent user activation trigger. Related to HTML issue: whatwg/html#3849 Also fix double-activation in Chrome's gesture tap. Bug: 826293, 1265587 Change-Id: I3bc3bcbcfeda242512fb777a1c8881c475fed5fc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3254213 Reviewed-by: Robert Flack <[email protected]> Reviewed-by: Avi Drissman <[email protected]> Commit-Queue: Mustaq Ahmed <[email protected]> Cr-Commit-Position: refs/heads/main@{#940118} -- wpt-commits: aa2fc4c2ddfac8b0870c0b075899478c9cabc0c2 wpt-pr: 31521
…activation trigger.", a=testonly Automatic update from web-platform-tests Revert "Add a WPT for pointerevent user activation trigger." This reverts commit 34b3146d8dfc1e44715703e4cf97779fc7c8688d. Reason for revert: Suspected cause of crbug.com/1269035, will verify before submitting. Original change's description: > Add a WPT for pointerevent user activation trigger. > > Related to HTML issue: whatwg/html#3849 > > Also fix double-activation in Chrome's gesture tap. > > Bug: 826293, 1265587 > Change-Id: I3bc3bcbcfeda242512fb777a1c8881c475fed5fc > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3254213 > Reviewed-by: Robert Flack <[email protected]> > Reviewed-by: Avi Drissman <[email protected]> > Commit-Queue: Mustaq Ahmed <[email protected]> > Cr-Commit-Position: refs/heads/main@{#940118} # Not skipping CQ checks because original CL landed > 1 day ago. Bug: 826293, 1265587 Change-Id: I4bc041f2254c382c00ce3596d61742ba84c79660 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3277061 Reviewed-by: Brian Sheedy <[email protected]> Reviewed-by: Johann Koenig <[email protected]> Commit-Queue: Brian Sheedy <[email protected]> Commit-Queue: Johann Koenig <[email protected]> Owners-Override: Johann Koenig <[email protected]> Cr-Commit-Position: refs/heads/main@{#940996} -- wpt-commits: eca3a50a442ab21283638efbf1617492924f5fdd wpt-pr: 31608
Related to HTML issue: whatwg/html#3849 Bug: 826293 Change-Id: I9e4bc0df46df63e05dac64af32c1aab7cdabffe4
Related to HTML issue: whatwg/html#3849 Bug: 826293 Change-Id: I9e4bc0df46df63e05dac64af32c1aab7cdabffe4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3282485 Commit-Queue: Mustaq Ahmed <[email protected]> Reviewed-by: Robert Flack <[email protected]> Cr-Commit-Position: refs/heads/main@{#942663}
Related to HTML issue: whatwg/html#3849 Bug: 826293 Change-Id: I9e4bc0df46df63e05dac64af32c1aab7cdabffe4
Related to HTML issue: whatwg/html#3849 Bug: 826293 Change-Id: I9e4bc0df46df63e05dac64af32c1aab7cdabffe4
Related to HTML issue: whatwg/html#3849 Bug: 826293 Change-Id: I9e4bc0df46df63e05dac64af32c1aab7cdabffe4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3282485 Commit-Queue: Mustaq Ahmed <[email protected]> Reviewed-by: Robert Flack <[email protected]> Cr-Commit-Position: refs/heads/main@{#942663}
Related to HTML issue: whatwg/html#3849 Also fix double-activation in Chrome's gesture tap. Bug: 826293, 1265587 Change-Id: I3bc3bcbcfeda242512fb777a1c8881c475fed5fc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3254213 Reviewed-by: Robert Flack <[email protected]> Reviewed-by: Avi Drissman <[email protected]> Commit-Queue: Mustaq Ahmed <[email protected]> Cr-Commit-Position: refs/heads/main@{#940118}
This reverts commit 34b3146d8dfc1e44715703e4cf97779fc7c8688d. Reason for revert: Suspected cause of crbug.com/1269035, will verify before submitting. Original change's description: > Add a WPT for pointerevent user activation trigger. > > Related to HTML issue: whatwg/html#3849 > > Also fix double-activation in Chrome's gesture tap. > > Bug: 826293, 1265587 > Change-Id: I3bc3bcbcfeda242512fb777a1c8881c475fed5fc > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3254213 > Reviewed-by: Robert Flack <[email protected]> > Reviewed-by: Avi Drissman <[email protected]> > Commit-Queue: Mustaq Ahmed <[email protected]> > Cr-Commit-Position: refs/heads/main@{#940118} # Not skipping CQ checks because original CL landed > 1 day ago. Bug: 826293, 1265587 Change-Id: I4bc041f2254c382c00ce3596d61742ba84c79660 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3277061 Reviewed-by: Brian Sheedy <[email protected]> Reviewed-by: Johann Koenig <[email protected]> Commit-Queue: Brian Sheedy <[email protected]> Commit-Queue: Johann Koenig <[email protected]> Owners-Override: Johann Koenig <[email protected]> Cr-Commit-Position: refs/heads/main@{#940996}
Related to HTML issue: whatwg/html#3849 Bug: 826293 Change-Id: I9e4bc0df46df63e05dac64af32c1aab7cdabffe4
…on trigger., a=testonly Automatic update from web-platform-tests Add a WPT for pointerevent user activation trigger. Related to HTML issue: whatwg/html#3849 Bug: 826293 Change-Id: I9e4bc0df46df63e05dac64af32c1aab7cdabffe4 -- wpt-commits: 266273172093e63a85e72b184735342d5c298797 wpt-pr: 31632
…on trigger., a=testonly Automatic update from web-platform-tests Add a WPT for pointerevent user activation trigger. Related to HTML issue: whatwg/html#3849 Bug: 826293 Change-Id: I9e4bc0df46df63e05dac64af32c1aab7cdabffe4 -- wpt-commits: 266273172093e63a85e72b184735342d5c298797 wpt-pr: 31632
* Remove all high-level events that follows a low-level event. * Add missing low-level events that are known to be required. * Add keyboard events, in a conditional manner. Fixes whatwg#3849.
* Remove all high-level events that follows a low-level event. * Add missing low-level events that are known to be required. * Add keyboard events, in a conditional manner. Fixes whatwg#3849.
Related to HTML issue: whatwg/html#3849 Also fix double-activation in Chrome's gesture tap. Bug: 826293, 1265587 Change-Id: I3bc3bcbcfeda242512fb777a1c8881c475fed5fc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3254213 Reviewed-by: Robert Flack <[email protected]> Reviewed-by: Avi Drissman <[email protected]> Commit-Queue: Mustaq Ahmed <[email protected]> Cr-Commit-Position: refs/heads/main@{#940118} NOKEYCHECK=True GitOrigin-RevId: 34b3146d8dfc1e44715703e4cf97779fc7c8688d
This reverts commit 34b3146d8dfc1e44715703e4cf97779fc7c8688d. Reason for revert: Suspected cause of crbug.com/1269035, will verify before submitting. Original change's description: > Add a WPT for pointerevent user activation trigger. > > Related to HTML issue: whatwg/html#3849 > > Also fix double-activation in Chrome's gesture tap. > > Bug: 826293, 1265587 > Change-Id: I3bc3bcbcfeda242512fb777a1c8881c475fed5fc > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3254213 > Reviewed-by: Robert Flack <[email protected]> > Reviewed-by: Avi Drissman <[email protected]> > Commit-Queue: Mustaq Ahmed <[email protected]> > Cr-Commit-Position: refs/heads/main@{#940118} # Not skipping CQ checks because original CL landed > 1 day ago. Bug: 826293, 1265587 Change-Id: I4bc041f2254c382c00ce3596d61742ba84c79660 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3277061 Reviewed-by: Brian Sheedy <[email protected]> Reviewed-by: Johann Koenig <[email protected]> Commit-Queue: Brian Sheedy <[email protected]> Commit-Queue: Johann Koenig <[email protected]> Owners-Override: Johann Koenig <[email protected]> Cr-Commit-Position: refs/heads/main@{#940996} NOKEYCHECK=True GitOrigin-RevId: 9872337b36442fa626dad89cee80f77fdd41fb30
Related to HTML issue: whatwg/html#3849 Bug: 826293 Change-Id: I9e4bc0df46df63e05dac64af32c1aab7cdabffe4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3282485 Commit-Queue: Mustaq Ahmed <[email protected]> Reviewed-by: Robert Flack <[email protected]> Cr-Commit-Position: refs/heads/main@{#942663} NOKEYCHECK=True GitOrigin-RevId: 5a60aab31ba136dae6cd61b0e48cb753929b1051
This is related to #1903, where we are working on a user activation model. Here I am isolating the discussion on "events that should trigger a user activation" because this looks like a parallel work that can go ahead with or without the model question.
Current Activation section mentions (among other things) a list of activation triggering events. Unfortunately the list doesn't represent the reality. A recent catalog of activation-triggering events in Chrome, Edge, Firefox and Safari shows the big inconsistencies we have today, sometimes even between desktop and mobile versions of the same browser.
We need to fix this.
One challenging point is the possibility that the set of events could be API-specific!
The text was updated successfully, but these errors were encountered: