scroll-behavior smooth doesn't work on body
Reported by
j...@molindo.at,
Nov 24 2017
|
||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36 Steps to reproduce the problem: 1. Add `scroll-behavior: smooth` to the body. 2. Render a page that is scrollable 3. Execute `window.scrollTo(0, 1000)` jsfiddle: https://jsfiddle.net/nm47j8zn/1/ What is the expected behavior? The page scrolls smoothly to the given position. What went wrong? The page scrolls immediately. Did this work before? No Does this work in other browsers? Yes Chrome version: 62.0.3202.94 Channel: stable OS Version: OS X 10.12.6 Flash Version: This works in Firefox 57.0 (64-bit) on macOS.
,
Nov 26 2017
,
Nov 27 2017
According to the cssom-view spec, smooth-scrolling is not propagated from body: https://drafts.csswg.org/cssom-view/#smooth-scrolling
,
Nov 28 2017
Intereseting, you're right. If I apply the scroll-behavior to `html` instead of `body` it works both in Chrome and Firefox: https://jsfiddle.net/nm47j8zn/2/. I guess that's the way to go and this is a bug in Firefox then. Thanks for your help.
,
Nov 28 2017
Thank you for providing more feedback. Adding requester "bugsnash@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Nov 28 2017
We should have a wpt for this. Searched a bit last night and couldn't find one.
,
Nov 28 2017
,
Nov 28 2017
Reported Firefox issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1421237 WPT tests: https://chromium-review.googlesource.com/c/chromium/src/+/793045
,
Nov 28 2017
,
Nov 28 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b7397ad0b246ce38e03a94081452534c279dd4da commit b7397ad0b246ce38e03a94081452534c279dd4da Author: Rune Lillesveen <futhark@chromium.org> Date: Tue Nov 28 18:08:48 2017 Web platform tests for smooth scroll-behavior. An interesting note is that the spec says scroll-behavior on BODY should not propagate to the viewport. Firefox currently does that. Bug: 788347 Change-Id: Id82deeac64177bce05268bb5fdb2df144f808800 Reviewed-on: https://chromium-review.googlesource.com/793045 Reviewed-by: Dave Tapuska <dtapuska@chromium.org> Commit-Queue: Rune Lillesveen <futhark@chromium.org> Cr-Commit-Position: refs/heads/master@{#519744} [add] https://crrev.com/b7397ad0b246ce38e03a94081452534c279dd4da/third_party/WebKit/LayoutTests/external/wpt/css/cssom-view/scroll-behavior-smooth.html
,
Nov 28 2017
,
Nov 28 2017
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by dtapu...@chromium.org
, Nov 24 2017Components: Blink>CSS Blink>Scroll