window.scrollTo with options not working on Microsoft Edge

前端 未结 7 1809
不知归路
不知归路 2020-12-03 21:07

I have a strange issue which I can only replicate on Microsoft browsers (Edge and IE11 tested).

7条回答
  •  渐次进展
    2020-12-03 21:44

    The "smoothscroll" polyfill supports only "smooth" option. To support all options in scrollIntoViewOptions it's better to use seamless-scroll-polyfill (https://www.npmjs.com/package/seamless-scroll-polyfill)

    Worked for me.

    Here is a link with explanation https://github.com/Financial-Times/polyfill-library/issues/657

提交回复
热议问题