DEV Community

Discussion on: React Component to Smooth Scroll to the Top

Collapse
 
duongductrong profile image
Trong Duong • Edited
window.scrollTo({
      top: 0,
      behavior: "smooth"
    });
Enter fullscreen mode Exit fullscreen mode

not working on safari browser. can u fix it?

Collapse
 
prnvbirajdar profile image
Pranav Birajdar

Since I use Chrome and Firefox, I didn't know it doesn't work on Safari.

This post on Stack Overflow has some suggestions you might find helpful.
stackoverflow.com/questions/560112...

Collapse
 
duongductrong profile image
Trong Duong

helpful ! thank bro