element.scrollIntoView with smooth behavior should animate scrollers simultaneously as opposed to sequentially
Reported by
jmeniche...@gmail.com,
Sep 22 2017
|
||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:55.0) Gecko/20100101 Firefox/55.0 Steps to reproduce the problem: Me and other developers wrote a polyfill that matches current Firefox implementation and I think scrollIntoView animation when there's a nested scrollable element doesn't look 'smooth'. 1. Go to https://iamdustan.com/smoothscroll 2. Scroll down to element.scrollIntoView example and click SCROLL INTO VIEW button 3. COmpare the behavior and animation between Firefox implementation, Chrome Implementation in v61 and Safari polyfilled behavior What is the expected behavior? Container element and body should scroll at the same time respecting simultaneous easing. What went wrong? Not only the elements get centered which honestly I don't know if it's expected. I do know it's harder to polyfilled and that right Chrome is stacking the animations that kills the smooth feel. Did this work before? N/A Does this work in other browsers? Yes Chrome version: 61.0.3163.100 (Build oficial) (64 bits) Channel: stable OS Version: OS X 10.12 Flash Version: Shockwave Flash 21.0 r0
,
Sep 25 2017
majidvp@ can you take a look?
,
Sep 26 2017
This is indeed the designed behavior. See SmoothScrollSequencer which is responsible to sequence the smooth scroll animations from outer most scroller to the inner one. AFAIK, the spec does not specify the order by which we should animate so this is not really an interop issue just different UX. /cc bokan@ and ajuma@ in case they have opinion one way or another in terms of UX. As for centering the elements by default, I think there was some confusion on the spec front on how the default behavior should be. I opened an issue with FF [2] and recently the spec changed away from 'center' being default to 'start' being the default [3]. Matching that change is being tracked in Issue 764282 . [1]https://codesearch.chromium.org/chromium/src/third_party/WebKit/Source/platform/scroll/SmoothScrollSequencer.h [2] https://bugzilla.mozilla.org/show_bug.cgi?id=1389274 [3] https://github.com/w3c/csswg-drafts/pull/1505
,
Jan 7
Sandra, Majid, any update on this bug?
,
Jan 7
|
||||
►
Sign in to add a comment |
||||
Comment 1 by manoranj...@chromium.org
, Sep 23 2017