New issue
Advanced search Search tips

Issue 788347 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug



Sign in to add a comment

scroll-behavior smooth doesn't work on body

Reported by j...@molindo.at, Nov 24 2017

Issue description

UserAgent: 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.
 
Cc: futhark@chromium.org
Components: Blink>CSS Blink>Scroll
Rune is this supposed to be one of those CSS promoted properties between the body and the document? Works fine in firefox; and works fine if we apply the scroll behavior to the html element.
Labels: Needs-Feedback
According to the cssom-view spec, smooth-scrolling is not propagated from body:

https://drafts.csswg.org/cssom-view/#smooth-scrolling

Comment 4 by j...@molindo.at, 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.
Project Member

Comment 5 by sheriffbot@chromium.org, Nov 28 2017

Cc: bugsnash@chromium.org
Labels: -Needs-Feedback
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
Labels: -Pri-2 Pri-3
Status: Available (was: Unconfirmed)
We should have a wpt for this. Searched a bit last night and couldn't find one.
Status: Started (was: Available)
Cc: -futhark@chromium.org
Owner: futhark@chromium.org
Project Member

Comment 10 by bugdroid1@chromium.org, 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

Cc: -bugsnash@chromium.org
Status: WontFix (was: Started)

Sign in to add a comment