fisshy / react-scroll

React scroll component
https://github.com/fisshy/react-scroll/blob/master/README.md
MIT License
4.35k stars 436 forks source link

Link is not scrolling correctly when containerElement has a border #560

Open danchistyakov opened 1 year ago

danchistyakov commented 1 year ago

Hello! In my real project I have a 1px border on my container element, so link scrolling is not passing this 1px to the element. So I don't have activeClass on my Link and I need to scroll this 1px manually.

Here's an example of 10px border to see the problem clearer.

Example: CodeSandbox.

Do you have any ideas? Maybe lib needs some fixes or I need to set this border in my project to another div?

@fisshy

fisshy commented 11 months ago

That's what the offset was meant to solve