How to Smoothly scrollIntoView JavaScript Without Jumping? or Why Isn't scrollIntoView JavaScript Wor

20 Replies, 1545 Views

Dynamic content? Yeah, scrollIntoView JavaScript won’t know about it unless you tell it.

Either delay the call or use something like `element.scrollIntoView({ behavior: 'smooth', block: 'nearest' })`—sometimes `nearest` works better than `start`.

Also, Safari hates smooth scrolling. Just saying.

Messages In This Thread



Users browsing this thread: 1 Guest(s)