New issue
Advanced search Search tips

Issue 593061 link

Starred by 6 users

Issue metadata

Status: Verified
Owner:
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , All
Pri: 1
Type: Bug

Blocking:
issue 632067
issue 682144



Sign in to add a comment

Touch slop suppression should be disabled in touch-action: none regions

Project Member Reported by rbyers@chromium.org, Mar 8 2016

Issue description

Use a painting app like http://rbyers.net/paint.html but instead of it calling preventDefault on touchstart, use just touch-action: none (eg. because you're trying to follow our guidance of using only passive touch listeners).

This should behave identically to the case when touchstart is cancelled.  But today it won't - the touchmoves within the slop region will get dropped, resulting in an unnecessary jump when movement starts slowly.

For now there may be a quick fix where we take the touch-action state into account in the browser (though that might be tricky depending on where slop suppression is done in the browser).

A better fix may be to move slop suppression into blink (based on the WebTouchEvent::movedBeyondSlopRegion flag).  This makes sense since slop suppression is really a web compat hack, and really shouldn't apply to (for example) pointer events.

It's even possible that we could get rid of slop suppression entirely - ideally it wouldn't be necessary (there just for compatbility with buggy tap-detection javascript).

Note that this is just about touch-action: none.  In all other cases (eg. touch-action: pan-x) we need the slop region to determine direction and resolve the touch-action, and therefore should behave the same as for touch-action: auto.
 
Owner: mustaq@chromium.org
Status: Assigned (was: Available)
I think a simple fix would be around touch_event_queue, but pushing the slop suppression into Blink seems better. I will give it a try.

Comment 2 Deleted

Comment 3 by nitz...@gmail.com, May 8 2016

As a web-developer, is there any workaround to receive all touchmove events ignoring the minimum touch slop?

Or as a user, is there any option in about:flags to ignore touch slop?
nitzing@: I believe you meant ignoring touch slop in general, not only in touch-action:none regions, right?

Comment 5 by nitz...@gmail.com, May 9 2016

Sorry, I had an issue in my experiment and I thought preventDefault was not enough to receive all touchmove events. Everything is fine now!

Comment 6 by mustaq@chromium.org, Jul 27 2016

Blocking: 632067
Now that Chrome 55 supports Pointer Events, is it possible to create a painting app that doesn't suffer from the slop region jump when using a Wacom pen?
Not yet but we would love to have it. Our internal plumbing overlaps with TouchEvents, making it hard to go for an easy fix I planned before (#c1).

On Windows?  Wacom pen is treated like mouse there so not subject to Chrome's slop suppression so should be unrelated to this issue (unless you're talking stylus on Android).
I'm testing on Windows.
After the down event you have to pass some distance with the pen before the first move event is fired.

 Issue #632067  says: Slop suppression should only affect Touch Events.
Doesn't it mean that not only Touch effected by this?

If the cause is not the slop region, can you show a simple painting app that is responsive in Chrome?
Try to write on Chrome and compare it with Edge to see the difference.
Chrome's slop suppression is touch-only, doesn't affect stylus in Windows as Rick clarified above.  Issue 632067  is about fixing PointerEvents of pointerType=touch (and Stylus in Android) w/o affecting TouchEvents.

As for the painting app, I will try to extend Rick's paint.html for pointer events by today.
@mustaq just tested again with Chrome 55.0.2883.75 m on a Windows 10 tablet with a digitizer.
I had to enable Pointer Events in Chrome://flags.

When you press the pen on the screen you get a pointerdown event.
When you move the pen, you don't get pointermove events until you cross some minimum distance. In a painting app you'll see a small jump.

If you use an external digitizer connected with USB you can uncheck "Use Windows Ink" to prevent the jump.

On Edge you get the pointermove events right after the pointerdown event.
Blocking: 682144
Labels: M-57
Bumping up the priority because keep.google.com is affected by this on CrOS (which routes stylus events as touch, see Issue 665499).
Labels: -Pri-2 Pri-1
Owner: lanwei@chromium.org
Status: Started (was: Assigned)
Project Member

Comment 17 by bugdroid1@chromium.org, Feb 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/00f7089132148e96541a6a476a68809790048e81

commit 00f7089132148e96541a6a476a68809790048e81
Author: lanwei <lanwei@chromium.org>
Date: Tue Feb 07 23:12:21 2017

Move touch slop suppression from LegacyTouchEventQueue to TouchEventManager

We do not want to suppress pointer events, but the current code suppresses touch events from browser side, so the pointer events are also suppressed. We move the slop region suppression code to TouchEventManager, so all the pointer moves will be dispatched.

BUG= 593061 

Review-Url: https://codereview.chromium.org/2669663002
Cr-Commit-Position: refs/heads/master@{#448773}

[modify] https://crrev.com/00f7089132148e96541a6a476a68809790048e81/components/test_runner/event_sender.cc
[modify] https://crrev.com/00f7089132148e96541a6a476a68809790048e81/components/test_runner/event_sender.h
[modify] https://crrev.com/00f7089132148e96541a6a476a68809790048e81/content/browser/renderer_host/input/legacy_touch_event_queue.cc
[modify] https://crrev.com/00f7089132148e96541a6a476a68809790048e81/content/browser/renderer_host/input/legacy_touch_event_queue.h
[modify] https://crrev.com/00f7089132148e96541a6a476a68809790048e81/content/browser/renderer_host/input/touch_event_queue_unittest.cc
[modify] https://crrev.com/00f7089132148e96541a6a476a68809790048e81/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/00f7089132148e96541a6a476a68809790048e81/third_party/WebKit/LayoutTests/fast/events/pointerevents/multi-pointer-event-in-slop-region.html
[add] https://crrev.com/00f7089132148e96541a6a476a68809790048e81/third_party/WebKit/LayoutTests/fast/events/pointerevents/pointer-event-in-slop-region.html
[modify] https://crrev.com/00f7089132148e96541a6a476a68809790048e81/third_party/WebKit/LayoutTests/fast/events/touch/touch-user-gesture.html
[modify] https://crrev.com/00f7089132148e96541a6a476a68809790048e81/third_party/WebKit/Source/core/input/TouchEventManager.cpp
[modify] https://crrev.com/00f7089132148e96541a6a476a68809790048e81/third_party/WebKit/Source/core/input/TouchEventManager.h
[modify] https://crrev.com/00f7089132148e96541a6a476a68809790048e81/third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp

Status: Fixed (was: Started)
Labels: ReleaseBlock-Beta Merge-Request-57
Let's merge it to beta for sake of Issue 682144.
Status: Verified (was: Fixed)
I have already verified the fix, see  crbug.com/632067#c7  .
Before we approve merge to M57, could you please confirm change is well baked in Canary and safe to merge to M57?
Yes, mustaq@ had verified this change in Win Canary (58.0.3006.0) in Comment 20.
Project Member

Comment 23 by sheriffbot@chromium.org, Feb 8 2017

Labels: -Merge-Request-57 Hotlist-Merge-Approved Merge-Approved-57
Your change meets the bar and is auto-approved for M57. Please go ahead and merge the CL to branch 2987 manually. Please contact milestone owner if you have questions.
Owners: amineer@(clank), cmasso@(bling), ketakid@(cros), govind@(desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Please merge your change to M57 branch 2987 before 5:00 PM PT, Friday 02/10 (sooner the better please) so we can take it in for next week beta release. Thank you.
Project Member

Comment 25 by bugdroid1@chromium.org, Feb 10 2017

Labels: -merge-approved-57 merge-merged-2987
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3a7825120516721b47e220d4075945834e78401f

commit 3a7825120516721b47e220d4075945834e78401f
Author: lanwei <lanwei@chromium.org>
Date: Fri Feb 10 00:12:04 2017

Move touch slop suppression from LegacyTouchEventQueue to TouchEventManager

*** This is a selected minimal part of the cherry-picked CL ***

We do not want to suppress pointer events, but the current code suppresses touch events from browser side, so the pointer events are also suppressed. We move the slop region suppression code to TouchEventManager, so all the pointer moves will be dispatched.

BUG= 593061 ,682144

Review-Url: https://codereview.chromium.org/2669663002
Cr-Commit-Position: refs/heads/master@{#448773}
(cherry picked from commit 00f7089132148e96541a6a476a68809790048e81)

R=mustaq@chromium.org

Review-Url: https://codereview.chromium.org/2680013009 .
Cr-Commit-Position: refs/branch-heads/2987@{#424}
Cr-Branched-From: ad51088c0e8776e8dcd963dbe752c4035ba6dab6-refs/heads/master@{#444943}

[modify] https://crrev.com/3a7825120516721b47e220d4075945834e78401f/content/browser/renderer_host/input/touch_event_queue.cc
[modify] https://crrev.com/3a7825120516721b47e220d4075945834e78401f/content/browser/renderer_host/input/touch_event_queue_unittest.cc
[modify] https://crrev.com/3a7825120516721b47e220d4075945834e78401f/third_party/WebKit/Source/core/input/TouchEventManager.cpp
[modify] https://crrev.com/3a7825120516721b47e220d4075945834e78401f/third_party/WebKit/Source/core/input/TouchEventManager.h
[modify] https://crrev.com/3a7825120516721b47e220d4075945834e78401f/third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp

Project Member

Comment 26 by bugdroid1@chromium.org, Feb 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a7ba9c6e69b1b9dd7747486c699496d90f48b62f

commit a7ba9c6e69b1b9dd7747486c699496d90f48b62f
Author: mustaq <mustaq@chromium.org>
Date: Tue Feb 14 21:43:05 2017

Revert of Move touch slop suppression from LegacyTouchEventQueue to TouchEventManager (patchset #3 id:40001 of https://codereview.chromium.org/2680013009/ )

Reason for revert:
NaCl problems: crbug.com/691310

Original issue's description:
> Move touch slop suppression from LegacyTouchEventQueue to TouchEventManager
>
> *** This is a selected minimal part of the cherry-picked CL ***
>
> We do not want to suppress pointer events, but the current code suppresses touch events from browser side, so the pointer events are also suppressed. We move the slop region suppression code to TouchEventManager, so all the pointer moves will be dispatched.
>
> BUG= 593061 ,682144
>
> Review-Url: https://codereview.chromium.org/2669663002
> Cr-Commit-Position: refs/heads/master@{#448773}
> (cherry picked from commit 00f7089132148e96541a6a476a68809790048e81)
>
> R=mustaq@chromium.org
>
> Review-Url: https://codereview.chromium.org/2680013009 .
> Cr-Commit-Position: refs/branch-heads/2987@{#424}
> Cr-Branched-From: ad51088c0e8776e8dcd963dbe752c4035ba6dab6-refs/heads/master@{#444943}
> Committed: https://chromium.googlesource.com/chromium/src/+/3a7825120516721b47e220d4075945834e78401f

TBR=lanwei@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=682144,691310
NOTRY=true
NOPRESUBMIT=true

Review-Url: https://codereview.chromium.org/2691993005
Cr-Commit-Position: refs/branch-heads/2987@{#510}
Cr-Branched-From: ad51088c0e8776e8dcd963dbe752c4035ba6dab6-refs/heads/master@{#444943}

[modify] https://crrev.com/a7ba9c6e69b1b9dd7747486c699496d90f48b62f/content/browser/renderer_host/input/touch_event_queue.cc
[modify] https://crrev.com/a7ba9c6e69b1b9dd7747486c699496d90f48b62f/content/browser/renderer_host/input/touch_event_queue_unittest.cc
[modify] https://crrev.com/a7ba9c6e69b1b9dd7747486c699496d90f48b62f/third_party/WebKit/Source/core/input/TouchEventManager.cpp
[modify] https://crrev.com/a7ba9c6e69b1b9dd7747486c699496d90f48b62f/third_party/WebKit/Source/core/input/TouchEventManager.h
[modify] https://crrev.com/a7ba9c6e69b1b9dd7747486c699496d90f48b62f/third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp

Labels: -ReleaseBlock-Beta -Hotlist-Merge-Approved -M-57 -merge-merged-2987 M-58
The merge was reverted (and is expected to stay reverted, right?), so this actually isn't fixed until M58.
Yes it was reverted and will stay that way. It is fixed in M58 (a follow on  issue 692702  was fixed due to the changes detailed in this bug).
Paint app still suffer from slop suppression when using a stylus in Chrome 58.

Is there a painting app that show how to paint in Chrome without the drag-delay between PointerDown and the first PointerMove?

In addition, placing the hand on a tablet prevent PointerEvents of a stylus to fire. You have to raise your hand and only touch the stylus to make the events fire.

pablo.platt: Please clarify which paint app you are talking about so that we can take a look. Is it http://rbyers.github.io/paint.html? This seems working fine.

Also: in which OS did you see the problem?
mustaq: I can reproduce both issues on http://rbyers.github.io/paint.html

Tested with Chrome 58.0.3029.81 on a Tablet with Wacom digitizer running Windows 10.

Slop superssion issue:
1. Go to http://rbyers.github.io/paint.html
2. Press the stylus on the screen.
3. Move the stylus very slowly and notice that you get the first PointerMove circle only after moving some distance.
4. Compare with Edge - you'll get the first PointerMove immediately.

Touch blocks Stylus issue:
1. Go to http://rbyers.github.io/paint.html
2. Place your hand on the screen.
3. Try to draw with the stylus - you can't draw because your hand blocks stylus events.
mustaq: please compare the attached images.
In chrome.png there is a gap between the black circle and the first red circle.
In edge.png there is no gap.

Please let me know if you can reproduce this issue.
We suffer from this issue for several years on multiple tablet models.

The http://rbyers.github.io/paint.html page is a bit misleading because the circles are large. If you'll try to draw or write text with a stylus with 1px width you'll notice that it's almost unusable in Chrome. The text looks broken and it forces you to write very slowly to make it look decent.
chrome.png
4.0 KB View Download
edge.png
7.9 KB View Download
Please discuss the problem in Issue 714183, this seems unrelated to touch events.
Touch emulation in Chrome Canary on macOS El Capitan doesn't have this fix.
Don't test this on Chrome Canary please. We recently landed a change which caused the suppression comes back. We wanted to see the effect of something and we are going to revert it later. But the change we landed only affect the current Canary and Dev which are M60.

Sign in to add a comment