User activation defining events should be consistent |
|||||
Issue description
This bug will track our progress on defining user activation events.
In Blink, the set of events that defines user activation (user gesture) consists of {mousedown, mouseup, touchend} and certain keyboard events. It's not documented anywhere, and we are not certain about some corner cases (e.g. Issue 709765).
Moreover, we saw at least one other definition in Chromium which seems way different from Blink's:
https://cs.chromium.org/chromium/src/content/browser/renderer_host/render_widget_host_impl.cc?rcl=f299db8a1ba43b920eb43d813fbdfdcbf32f47d4&l=2383
This one is odd since from Blink we deliberately removed touchstart/scroll_start user gestures from M56:
https://www.chromestatus.com/feature/6131337345892352
We need to make this consistent throughout Chromium. We are thinking about moving the user activation detection logic to a central place in browser once Blink-side frame states (i.e. UserActivationV2) has shipped.
In long term, we should also plan to spec it to resolve browser differences around this.
https://docs.google.com/document/d/1hYRTEkfWDl-KO4Y6cG469FBC3nyBy9_SYItZ1EEsXUA/edit#heading=h.mjcf71kj4i4b
,
Apr 5 2018
One valid use case came up today in Issue 829145 #c6 where a contextmenu event could possibly be considered a user activation so that a webpage can vibrate on long-press to mimic native Andoird/iOS apps.
,
Apr 6 2018
Makes sense to me.
,
Apr 9 2018
contextmenu being a user gesture makes perfect sense to me. It probably just hasn't come up before, but I find the argument in issue 829145 (vibrate on long press like native) very compelling. I suspect we should just add contextmenu ASAP, the potential for abuse or breakage seems trivial to me.
,
Apr 24 2018
,
Jun 11 2018
,
Jun 20 2018
I made a table of "activation defining events" for Chrome, Edge, Firefox and Safari, each for mobile and desktop. It's way more inconsistent that what I was hoping to see: https://docs.google.com/spreadsheets/d/1DGXjhQ6D3yZXIePOMo0dsd2agz0t5W7rYH1NwJ-QGJo/edit#gid=0 rbyers@ and I had a quick chat yesterday, and decided that kicking off a spec discussion just for this (in parallel to UAv2) won't be much helpful until we have UAv2 shipped, or at least ready to ship. We also want to decouple this from UAv2 because this bug would involve handling regressions in real websites, which shouldn't slow down UAv2 shipping.
,
Jul 24
Created a new spec issue: https://github.com/whatwg/html/issues/3849 |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by mustaq@chromium.org
, Mar 27 2018