⚓ Apply smooth scroll to anchor links, polyfill scroll-behavior
window.__forceSmoothscrollAnchorPolyfill__
, you can now pass { force: true }
when invoking polyfill()
to force-enable the package even in browsers with native support#top
is now supported for scrolling to the top, but only if no element with id top
is foundhistory.pushState()
to match default browser behavior.preventScroll
argument, the anchor is focused immediately and the focus scroll is prevented by passing this argument.preventScroll
(e.g. Internet Explorer), the focus is scheduled to happen 450ms after the smooth scroll started so it does not interfere with the smooth scrolling (which caused flickering).window.__forceSmoothscrollAnchorPolyfill__
. The docs have been updated to reflect this.event.preventDefault()
Element.classList
, requestAnimationFrame
+ an alternative for flexbox layouts have been added