magic-akari / seamless-scroll-polyfill

Scroll Behavior polyfill
https://www.npmjs.com/package/seamless-scroll-polyfill
MIT License
159 stars 12 forks source link

elementScrollIntoView not working properly when element's scrolling parent is in a shadow DOM #109

Closed SunsetRider closed 3 years ago

SunsetRider commented 3 years ago

Currently elementScrollIntoView won't work properly when the element's scrolling parent is in a shadow DOM. Needs to get the element's parent manually first like this element.parentElement.shadowRoot.querySelector('.scrollingParent'), then do the calculation and scrolling manually. Any plan to support this use case for elementScrollIntoView?