Open arambert opened 4 years ago
If you don't use {behavior: 'smooth'}
in your arguments it won't work either.
I'd recommend using https://github.com/magic-akari/seamless-scroll-polyfill 👍 instead of this plugin.
I'd recommend using https://github.com/magic-akari/seamless-scroll-polyfill 👍 instead of this plugin.
Thank you fixed my issue! 👍
It is possible that this could be fixed by changing this line for
var Element = w.Element;
The polyfill for scrollIntoView doesn't work if you want to use it on an SVGElement (g, circle polygon, etc.) on Safari. On Safari SVGElement does not inherit from HtmlElement || Element. To make it work, after:
import smoothscroll from 'smoothscroll-polyfill' smoothscroll.polyfill()
add:window.SVGElement.prototype.scrollIntoView = (window.HTMLElement || window.Element).prototype.scrollIntoView