"Why isn't javascript scrollintoview working as expected?"
Hey folks!
So I’m trying to use javascript scrollintoview to smoothly scroll to a section on my page, but it’s just snapping there like it’s in a hurry or something. 😅
I’m using the basic `element.scrollIntoView()` but it feels kinda jarring. Anyone else run into this?
Also, does javascript scrollintoview even support smooth scrolling by default, or do I need to tweak it? Tried adding `{ behavior: 'smooth' }` but it’s still hit or miss, especially on mobile.
Speaking of mobile—does javascript scrollintoview work consistently there? Or am I better off using a polyfill?
Thanks in advance! 🙏
Hey folks!
So I’m trying to use javascript scrollintoview to smoothly scroll to a section on my page, but it’s just snapping there like it’s in a hurry or something. 😅
I’m using the basic `element.scrollIntoView()` but it feels kinda jarring. Anyone else run into this?
Also, does javascript scrollintoview even support smooth scrolling by default, or do I need to tweak it? Tried adding `{ behavior: 'smooth' }` but it’s still hit or miss, especially on mobile.
Speaking of mobile—does javascript scrollintoview work consistently there? Or am I better off using a polyfill?
Thanks in advance! 🙏
