Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Window: scrollTo() - smooth behavior is supported since Safari 15.4 #22889

Open
albertopiva opened this issue Apr 19, 2024 · 0 comments
Open
Labels
data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API

Comments

@albertopiva
Copy link

albertopiva commented Apr 19, 2024

What type of issue is this?

Incorrect support data (example: BrowserX says "86" but support was added in "40")

What information was incorrect, unhelpful, or incomplete?

The Window scrollTo API browser compatibility table specifies that the options.behavior is supported since Safari 14 without the support of the smooth behavior:

Safari does not have support for the smooth scroll behavior.

What browsers does this problem apply to, if applicable?

Safari

What did you expect to see?

From Safari 15.4 they introduced the support of smooth scroll:

Added support for the CSS scroll-behavior property and ScrollOptions, allowing smooth scrolling to anchors or via JavaScript.

Moreover, looking at the documentation of WebKit 15.4 we can confirm the support of the smooth behavior via css but also Window.scrollTo().

Developers can also control scroll behavior for an element with either the CSS scroll-behavior property or the behavior option in window.scroll(), window.scrollTo(), and window.scrollBy() methods in JavaScript. This new support gives developers the ability to choose between instantly jumping to a position in the viewport or smoothly animating the scroll operation.

Did you test this? If so, how?

Yes I did (using the iOS simulator offered by Xcode with iOS 15.4 which uses Safari 15.4).
You can test yourself with any version of Safari >= 15.4

Can you link to any release notes, bugs, pull requests, or MDN pages related to this?

Safari release notes: https://developer.apple.com/documentation/safari-release-notes/safari-15_4-release-notes
WebKit release notes: https://webkit.org/blog/12445/new-webkit-features-in-safari-15-4/

Do you have anything more you want to share?

No response

MDN URL

No response

MDN metadata

No response

@queengooborg queengooborg added the data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API
Projects
None yet
Development

No branches or pull requests

2 participants