Closed rocifier closed 4 years ago
Did you load both
<script src="//unpkg.com/smoothscroll-polyfill/dist/smoothscroll.min.js"></script>
and
<script src="//unpkg.com/smoothscroll-anchor-polyfill"></script>
? :)
Thanks for your prompt reply. I've just tried step 2a:
I only require smooth scrolling for links to named anchors. Is there a pre-requisite of smoothscroll.min.js for that use case?
Is there a pre-requisite of smoothscroll.min.js for that use case?
Yep. Or not smoothscoll-polyfill
specifically, but rather any Polyfill that enables window.scroll({ behavior: 'smooth' })
and Element.scrollIntoView({ behavior: 'smooth' })
– as smoothscroll-anchor-polyfill
is using that under the hood, and is itself just concerned with detecting clicks on anchors, hashchanges, updating the URL and focus management. Dropping in
<script src="//unpkg.com/smoothscroll-polyfill/dist/smoothscroll.min.js">
in addition to smoothscroll-anchor-polyfill
is probably the easiest way to get started. :)
Adding the above should fix your issue, if not feel free to comment again and I'll reopen :)
Tried the font-family hack and the inline style on , IE11 just jumps to named anchors immediately.