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

Issue 632881 link

Starred by 6 users

Issue metadata

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



Sign in to add a comment

Disable touch events but not pointer events for touch

Project Member Reported by rbyers@chromium.org, Jul 29 2016

Issue description

For testing purposes and because some users might prefer this on desktop to work around sites that are broken with touch+mouse, we should have some flag that disables the touch events API but leaves pointer events working properly for touch.  I.e. makes us behave like Edge desktop in this regard.

I thought simply disabling chrome://flags/#touch-events would do that, but it looks like that's broken - still fires touch events.  Maybe it just turns off the feature detection APIs while still letting the events through?  Obviously we'd still want the WebTouchEvents to go to blink.

Perhaps we're just missing a RuntimeEnabledFeatures::touchEnabled check in PointerEventManager where it calls into TouchEventManager?  Or it looks like it might be easier at the moment to put those checks into TouchEventManager itself?
 
 

Comment 1 by rbyers@chromium.org, Jul 29 2016

Note that when the "touch" runtime enabled feature is disabled, we disable all the CC touch hit testing machinery.  So turning this off means we get touch events but probably either always fast touch scrolling, or broken touch events (as if all listeners were passive?).  Didn't check which.

The code is probably in this weird state because the --touch-events command line flag used to control touch support up at the top of chromium (so when it was off, blink would never even get any touch events).  sadrul@ changed that at one point as part of a cleanup.  We should probably rename / clarify the RuntimeEnabledFeature to make it clear that it controls the touch event API exposure (although disabling it doesn't hide it completely - we still want devtools touch emulation to mostly work when it's disabled).
Owner: mustaq@chromium.org
Status: Assigned (was: Available)
Just preventing TE dispatch should be enough but need to consider possible side-effects of "disabled cc touch hit testing machinery". Trying to figure out, any comments?

Looks like touch-action could be affected.
Cc: dtapu...@chromium.org
Yeah we want the 'Touch' RuntimeEnabledFeature disabled so that touch event feature detection (like "ontouchstart" in window) doesn't pass.

But we need to make sure that CC touch hit-testing is still functioning for the sake of touch-action.  Perhaps CC touch hit testing should just always be active now - you never know when a touch screen could be plugged in via USB and we probably should handle that case for pointer events (which don't have the same constraints the TouchEvent API does).

dtapuska@ any thoughts?
If you can't construct a TouchEvent in JS; we shouldn't dispatch the events. And I do think we should always update the touch rects. Since this code would typically run on mobile which is lower powered there should technically be no reason not to enable it always on desktop.

Comment 6 by mustaq@chromium.org, Sep 28 2016

Cc: rbyers@chromium.org davidlab...@smarttech.com sunyunjia@chromium.org chefjoep...@gmail.com jsc...@chromium.org
 Issue 645121  has been merged into this issue.

Comment 7 by mustaq@chromium.org, Sep 28 2016

Blocking: 644318

Comment 8 by rbyers@chromium.org, Oct 13 2016

Blocking: -644318

Comment 9 by mustaq@chromium.org, Feb 22 2017

@rbyers: With chrome://flags/#touch-events controlling only TouchEvent-feature-detection from M57, I think we are done here. In other words, we don't need a separate flag to suppress firing TouchEvent altogether, right?
Cc: goanuj@chromium.org

Comment 11 by mustaq@chromium.org, Jan 18 (5 days ago)

Labels: -Pri-2 Pri-3

Sign in to add a comment