Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Scrollspy issue when using overflow hidden and flexbox #259

@chrisbag

Description

@chrisbag

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions