Coder Social home page Coder Social logo

Comments (12)

gpbl avatar gpbl commented on May 29, 2024 2

@wessberg thanks for your work on this polyfill! It seems that .13 breaks Safari making it to scroll back to the first element:

2020-05-06 11 30 07

https://codepen.io/FabianK/pen/zJLLrR

I can't see from the diff however how it would:
v2.0.12...v2.0.13

maybe the dependencies updates?

from scroll-behavior-polyfill.

wessberg avatar wessberg commented on May 29, 2024 1

Hi there. Thanks for submitting this issue. I've confirmed this issue thanks to your repro.
I've fixed it in the latest release (v2.0.7).

from scroll-behavior-polyfill.

kdubb avatar kdubb commented on May 29, 2024

Version 2.0.6 works in Safari (scrolls to correct location via anchor update), 2.0.7 causes the same/similar bug as was reported in Edge under 2.0.6.

from scroll-behavior-polyfill.

wessberg avatar wessberg commented on May 29, 2024

Hi there. I'm reopening the issue. Do you a simple reproducible demo I can take a look and investigate? Also, which Safari version are you seeing this behavior in?

from scroll-behavior-polyfill.

olets avatar olets commented on May 29, 2024

Seeing a similar thing in Safari 12.1.2. Seems to happen in two stages β€” scrolls first to what might be the correct location (it's too quick for me to be sure. it's close anyway) and then to somewhere else (close the starting point, possibly back at the starting point)

from scroll-behavior-polyfill.

Krutsch avatar Krutsch commented on May 29, 2024

I dont own a device but maybe my demo might still help
https://codepen.io/FabianK/pen/zJLLrR

from scroll-behavior-polyfill.

wessberg avatar wessberg commented on May 29, 2024

@Krutsch, Safari v12.1, v13, and v13.1, works great with your codepen demo.

@olets, it would be great if you could provide a repo that I can take a look at since I can't reproduce this behavior easily. I can test in Safari 12.1.

from scroll-behavior-polyfill.

Krutsch avatar Krutsch commented on May 29, 2024

By the way, do you support IE11 too? πŸ™ˆ (https://zealous-tereshkova-e96a40.netlify.com)
I think it was working once - maybe I broke it with changes πŸ’£

from scroll-behavior-polyfill.

wessberg avatar wessberg commented on May 29, 2024

@Krutsch, there was a few IE-related issues with Element.prototype.scrollIntoView as well as anchor navigation. I've fixed these and published a new version: v2.0.13

from scroll-behavior-polyfill.

Krutsch avatar Krutsch commented on May 29, 2024

Thank you for your time and effort!!
It is working like a charm ❀️

from scroll-behavior-polyfill.

wessberg avatar wessberg commented on May 29, 2024

Closing this issue since the original issue may have been fixed in v2.0.13. If that is not the case, feel free to comment again, and I'll reopen this issue.

from scroll-behavior-polyfill.

martinschilliger avatar martinschilliger commented on May 29, 2024

@gpbl I believe I've found the solution: The polyfill sets the property scroll-snap-type: none in the element's style attribute to prevent troubles with snapping. But setting scroll-snap-type in safari causes a scrolling to 0. 🀯

The workaround was for me to set scroll-snap-type: y mandatory !important in the stylesheet (where the polyfill cannot detect it according to https://github.com/wessberg/scroll-behavior-polyfill#are-there-any-known-quirks).

It's ugly, but it works. But could cause troubles in the future… πŸ™„

from scroll-behavior-polyfill.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.