scroll-into-view / scroll-into-view-if-needed

Element.scrollIntoView ponyfills for things like "if-needed" and "smooth"

Home Page:https://scroll-into-view.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Content partially hidden behind scrollbars

ChickenProp opened this issue ยท comments

When I set block/inline to end or nearest, in a container with scrollbars, part of the target element on the bottom and right remains hidden behind the scrollbars.

This is visible on https://scroll-into-view-if-needed.netlify.com/, the "scroll alignment" example. With block and inline both set to nearest, scrolling to 9 results in the green box being only partially visible, while scrolling to 1 results in that green box being fully visible. If I set the container to overflow: visible in devtools, scrolling to 9 results in the green box being fully visible, like for 1.

I get this behaviour on both Firefox 52.5 and Chromium 64.0.

Ah youโ€™re right! Thanks for the report! ๐Ÿ˜„

I will get time to work on a fix for this over the weekend, PRs are welcome meanwhile though.
If anyone submits a fix Iโ€™ll merge and release it right away ๐Ÿ™‚

๐ŸŽ‰ This issue has been resolved in version 2.2.7 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€