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

Issue 667477 link

Starred by 3 users

Issue metadata

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



Sign in to add a comment

Setting scrollTop during smooth scroll does not eventually scroll to that scrollTop.

Project Member Reported by flackr@chromium.org, Nov 21 2016

Issue description

In the scroll interruption tests we try to cancel a scroll with a smooth scroll, and then cancel that smooth scroll to start the next test case by setting scrollTop. There seems to be a bug in that we continue to smooth scroll for a frame or two and don't end up at the set scroll position.
 

Comment 1 by ajuma@chromium.org, Nov 21 2016

More context: see the workaround added to scroll-interruption-test.js in
https://codereview.chromium.org/2511473003/
Labels: Hotlist-Input-Dev
This is causing a huge issue for us in our chat app.

If you imagine a Facebook chatbox, the most recent messages, and the scroll position are set to begin at the bottom of the scrollable element.  Then as you scroll upwards, new content (older messages) is added above and the scroll position is then set to compensate.  


On all other browsers the result is smooth, perfect scrolling while this content is added.  In Chrome however, after setting the scrollTop to account for the newly added content, any momentum left from smooth scrolling with the mousewheel overrides the new scrollTop, continuing from it's previously set position.  Ultimately, this causes a huge jumping effect.

If you were to track the scroll position each from it would look something like the following:

Read scrollTop: 1000
Read scrollTop: 945
Read scrollTop: 903
Read scrollTop: 876
SET SCROLLTOP : 2056
Read scrollTop: 849
Read scrollTop: 821
Read scrollTop: 811
Read scrollTop: 799
In a nutshell, the off main thread scrolling physics should take into account any changes to the scrollTop, made via javascript.

So that the above example, fired from a single mousewheel "roll", looks more like this:

Read scrollTop: 1000
Read scrollTop: 945
Read scrollTop: 903
Read scrollTop: 876
SET SCROLLTOP : 2056
Read scrollTop: 2012
Read scrollTop: 1984
Read scrollTop: 1957
Read scrollTop: 1941

Sign in to add a comment