magic-akari / seamless-scroll-polyfill

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

`{block: 'nearest'}` doesn't work properly when the target is hidden below bottom edge #126

Closed dakur closed 2 years ago

dakur commented 3 years ago

Neither in standard document, nor in an iframe – though it's consistent in how it's wrong – in both cases the target element becomes hidden above top edge of the current window element instead of being sticked to the bottom of it. Looks like height of the window element has been forgotten to take into consideration.

See an example: https://codesandbox.io/s/festive-cookies-ogk06 – try to click the button at the top and at the bottom

github-actions[bot] commented 2 years ago

:tada: This issue has been resolved in version 2.1.4 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

magic-akari commented 2 years ago

Thanks!

dakur commented 2 years ago

Thank you – for the fix!