New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 826293 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocked on:
issue 836401



Sign in to add a comment

User activation defining events should be consistent

Project Member Reported by mustaq@chromium.org, Mar 27 2018

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
 

Comment 1 by mustaq@chromium.org, Mar 27 2018

Cc: rbyers@chromium.org a...@chromium.org
Cc: binlu@chromium.org ojan@chromium.org
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.

Comment 3 by ojan@chromium.org, Apr 6 2018

Makes sense to me.
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.

Comment 5 by mustaq@chromium.org, Apr 24 2018

Blockedon: 836401

Comment 6 by mustaq@chromium.org, Jun 11 2018

Blocking: 848778

Comment 7 by mustaq@chromium.org, Jun 20 2018

Blocking: -848778
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.
Created a new spec issue: https://github.com/whatwg/html/issues/3849

Sign in to add a comment