New issue
Advanced search Search tips

Issue 773986 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Touch Scrolling is interrupted when touch target element is removed from DOM

Reported by tobias.r...@esolutions.de, Oct 12 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36

Steps to reproduce the problem:
How to reproduce
1. Have a scrollable DIV with several child element
2. touch one of the child element on a touchscreen with the finger
3. move the finger on the touchscreen or make a fling gesture. => The DIV scrolls using the native scrolling mechanism (ie not scrolling via javascript)
4. remove the touch target element from DOM via javascript (while the finger is still on the screen or while a fling animation is still running)

What is the expected behavior?
Expected behavior:
* If the finger is still on the screen, the scrollable DIV should continue to scroll when the finger is moved on the touchscreen
* If a fling animation is running, the animation should not be stopped immediately, but continue with a smooth animation

What went wrong?
Current behavior:
* When the finger is on the touchscreen while the touch target element is removed, the scrolling is stopped. Ie. the scollable DIV doesn't move any more even though the finger is moved on the touchscreen.
* When a fling animation is running while the previous touch target element is removed, the fling animation is stopped immediately instead of a smooth deceleration

Did this work before? No 

Chrome version: 61.0.3163.100  Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: 

Please note, that this problem does not occurr with the touch emulation of the dev tools. You need a real touchscreen.

If you have a touchscreen, you can see an example here:
https://codepen.io/anon/pen/QqxxPd 
(touch item 3 and move the finger upward >200px. Then item 3 is replaced by another element and scrolling stops)

Or here:
https://rawgit.com/danielgindi/DGTable.js/master/example/example.html

I can reproduce it under Windows with Chrome  61.0.3163.100, but I have also seen it under Ubuntu with Chrome 60...
 

Comment 1 Deleted

seems duplicapte of https://bugs.chromium.org/p/chromium/issues/detail?id=771409
you can reproduce it with clicking on the mouseWheel button instead touch screen

Comment 3 by bokan@chromium.org, Oct 12 2017

Cc: sahel@chromium.org
Components: -Blink Blink>Input
Labels: -OS-Windows -Pri-2 Hotlist-Input-Dev Pri-3
Status: Untriaged (was: Unconfirmed)

Comment 4 by bokan@chromium.org, Oct 12 2017

Cc: -sahel@chromium.org bokan@chromium.org
Owner: sahel@chromium.org
Status: Assigned (was: Untriaged)
This is related to 771409 but the implementation is probably different today so lets keep the bug separate.

IMO, we should fix this in the same way since touch and wheel will soon work much more similarly. 

Comment 5 by sahel@chromium.org, Oct 12 2017

Status: Started (was: Assigned)
Project Member

Comment 6 by bugdroid1@chromium.org, Oct 20 2017

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

commit 209d2454442b33a913b53a902c0646062fa25bcc
Author: Sahel Sharify <sahel@chromium.org>
Date: Fri Oct 20 16:56:50 2017

Scrolling a new node when the latched node is removed.

When the currently scrolling element gets removed, scrolling should
continue with scrolling the next element even when scroll latching is
enabled. This behavior is consistent with what both Safari and Firefox
browsers do.

This cl fixes the issue for both wheel and touch scrolling:
When the latched element gets deleted in the middle of a scrolling
sequence on main thread side, handling a synthetic GSB causes a new
hittest to continue scrolling on a different element. Scrolling on the
compositor side was already working for non-animated wheel scrolling
since deleting the scrolling node forces the rest of the scrolling to
be handled on main thread side. Before handling the rest of the GSUs
in main thread side,a GSB gets sent to the main thread side to cause
a hittesting. This cl adds transferring to the main thread side for
touch scrolling as well.
ScrollAnimation path for wheel scrolling is also changed to re-latch
when the latched scrolling node gets deleted in the middle of scrolling. 

InputHandlerProxyTest.(Wheel/Touch)ScrollHandlingSwitchedToMainThread,
WheelScrollLatchingBrowserTest.WheelScrollingRelatchWhenLatchedScrollerRemoved

Bug:  771409 , 773986 
Test: virtual/wheelscrolllatching/latched-scroll-node-removed.html,
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I24630a101a184fcd6a8480c553074808ffea6a35
Reviewed-on: https://chromium-review.googlesource.com/709658
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: weiliangc <weiliangc@chromium.org>
Reviewed-by: David Bokan <bokan@chromium.org>
Commit-Queue: Sahel Sharifymoghaddam <sahel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510468}
[modify] https://crrev.com/209d2454442b33a913b53a902c0646062fa25bcc/cc/trees/layer_tree_host_impl.cc
[modify] https://crrev.com/209d2454442b33a913b53a902c0646062fa25bcc/cc/trees/layer_tree_host_impl.h
[modify] https://crrev.com/209d2454442b33a913b53a902c0646062fa25bcc/content/browser/renderer_host/input/wheel_scroll_latching_browsertest.cc
[modify] https://crrev.com/209d2454442b33a913b53a902c0646062fa25bcc/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/209d2454442b33a913b53a902c0646062fa25bcc/third_party/WebKit/LayoutTests/fast/events/wheel/latched-scroll-node-removed.html
[modify] https://crrev.com/209d2454442b33a913b53a902c0646062fa25bcc/third_party/WebKit/Source/core/input/ScrollManager.cpp
[modify] https://crrev.com/209d2454442b33a913b53a902c0646062fa25bcc/third_party/WebKit/Source/core/input/ScrollManager.h
[modify] https://crrev.com/209d2454442b33a913b53a902c0646062fa25bcc/ui/events/blink/input_handler_proxy.cc
[modify] https://crrev.com/209d2454442b33a913b53a902c0646062fa25bcc/ui/events/blink/input_handler_proxy_unittest.cc

Comment 7 by sahel@chromium.org, Oct 20 2017

Status: Fixed (was: Started)

Sign in to add a comment