2

I am currently building my site in react. However the refs scroll/css is not compatible with safari and some other browsers. Meaning in safari it just jumps to a div instead of scrolling to it.

Not compatible

html {
   scroll-behavior: smooth;
}

What is the best library (that is active) or method to create an all browser (latest versions) smooth scroll functionality. I do not want it to be too heavy because it will be used often.

This is what my current scroll is based on: ReactJS how to scroll to an element

Otto
  • 663
  • 3
  • 17
  • 33
  • Hi have you simply tried the native `window.scrollTo()` https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollTo ? – t3__rry Oct 07 '19 at 10:21
  • @t3__rry The native `window.scrollTo()` isn't a smooth transition. Also the extra options on it that enable it to be smooth are not compatible with safari. – Otto Oct 08 '19 at 16:12

0 Answers0