-1

I saw a few posts about this issue and I understood that safari doesn't support it, now I saw only suggestions to do it with jQuery, here is not the case, I have 100% React based app and I don't want to use jQuery only for smooth scroll for safari, can anyone suggest any better / easier idea how to make it done ?

currently I'm using the smooth scrolling with window object, I'll add that it works in perfectly fine in Chrome.

window.scroll({
  top: 0,
  left: 0,
  behavior: 'smooth',
});

thank you!

greW
  • 1,248
  • 3
  • 24
  • 49
  • Safari already support the behavior, did you try running app on different machines? https://developer.mozilla.org/en-US/docs/Web/API/Window/scroll#Browser_Compatibility – Dipen Shah Oct 03 '18 at 15:28
  • @DipenShah OP meant smooth scroll which is not supported by safari according to MDN document as of today – Jun Feb 27 '19 at 07:30
  • Possible duplicate of [Javascript - window.scroll({ behavior: 'smooth' }) not working in Safari](https://stackoverflow.com/questions/51229742/javascript-window-scroll-behavior-smooth-not-working-in-safari) – Jun Feb 28 '19 at 09:37

1 Answers1

1

Take a look at scroll, it has easing options.

Poyu
  • 116
  • 1
  • 1
  • 6