New issue
Advanced search Search tips

Issue 835208 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug

Blocked on:
issue 582140



Sign in to add a comment

pointerdown event not considered as user gesture by autoplay policy

Project Member Reported by dpa...@chromium.org, Apr 20 2018

Issue description

Chrome Version: 66.0.3359.117
OS: Linux (have not tried other platforms yet).

Repro steps (also see attached screencast)

1. Load attached HTML file.
2. Open DevTools and turn on Device mode (otherwise it will not repro). 
3. Click in the Omnibox and hit enter (this is necessary apparently).
4. Click on the 2nd button once (which uses 'pointerdown' event).
5. Observe warning thrown in the console

"The AudioContext was not allowed to start. It must be resume (or created) after a user gesture on the page."

6. Repeat steps 3 and 4 a few times, it will keep throwing the warning in the console.
7. Repeat step 3, and then click on the 1st button (which uses a 'click' event). Notice that there is no warning.

Also note that if step 3 is replaced with "Hit the refresh button", the bug does not reproduce (most likely refresh is different than navigation).


What is the expected result?
pointerdown should be considered a user gesture, because it is one.

What happens instead?
pointerdown is not detected as a user gesture.

Started noticing this on the version mentioned above. Have not performed a bisect yet. Also have not tried other platforms yet.
 
webaudio_bug.html
579 bytes View Download
autoplay_bug.mp4
914 KB View Download

Comment 1 by dpa...@chromium.org, Apr 20 2018

Labels: RegressedIn-66

Comment 2 by dpa...@chromium.org, Apr 20 2018

Description: Show this description

Comment 3 by rtoy@chromium.org, Apr 20 2018

Cc: mlamouri@chromium.org
Components: Blink
Any updates here?

Comment 5 by rbyers@chromium.org, May 15 2018

Status: Won (was: Untriaged)

Comment 6 by rbyers@chromium.org, May 15 2018

Blockedon: 582140
Components: -Blink Blink>Input
Status: WontFix (was: WOn)
Sorry, pointerdown for touch is intentionally not a user gesture because scrolling is not a user gesture (eg. scrolling on top of an ad should not allow that ad to open a popup - see  issue 582140  and my doc here: https://docs.google.com/document/d/1oF1T3O7_E4t1PYHV6gyCwHxOi3ystm0eSL5xZu7nvOg/edit#).

Use pointerup or click instead.

Comment 7 by dpa...@chromium.org, May 15 2018

Thanks for the links, I understand the tradeoff now, but there is still a problem where pointerdown is not necessarily always leading to a scroll.

One can use pointerdown for various reasons, for example attaching it to a button because it is more responsive than click (happens before user releases the finger), or to implement a drag-and-drop functionality, or any other scenario where a pointerdown is actually the result of the user interacting with the page other than scrolling.

Sign in to add a comment