react-scrollspy
react-scrollspy copied to clipboard
Scrollspy issue when using overflow hidden and flexbox
Hello, First of all, thanks for the awesome package.
I have been struggling for the last day trying to make it work in my use case. I basically have an app with the following components :
- a top bar.
- Under the topbar, I have a flexbox with on the left the content (which is scrollable) and on the right the Scrollspy element which must also be scrollable as it might contain many sections
The anchor links work fine but the scrollspy element is unable to locate the correct sections of the content.
Here is the link of the codesandbox reproducing the issue https://codesandbox.io/s/react-scrollspy-bug-m4708?file=/src/styles.css
Would you have any idea of what might be causing the issue ? any workarounds possible ? (the package works fine when I don't use flexbox and hidden overflows
Thanks a lot for your help :)
Chris