DEV Community

loading...

Discussion on: scrollIntoView is the best thing since sliced bread

tunaxor profile image
Angel D. Munoz

extra points for that gif

Thread Thread
jplindstrom profile image
Johan Lindstrom

Actually, this sub-thread detour specifically just helped me learn about this for a Vue app, so thanks for that everyone :)

Thread Thread
kwisatzhazerach profile image
roo kangaroo

I used {block: "nearest"} instead of {block: "center"}. It prevents the vertical scroll.
I also developed a horizontal scroll-carousel. And it works really fine!