Skip to content

Math for returning to higher offset items appears off #1

@isolationism

Description

@isolationism

Your own demo does this as well, though less reliably than my own work with more items and a larger offset. Observe this recording:

react-ui-scrollspy-bug

You can see the issue happens twice; once when I click "Section 2" then again when I click "Section 1". Also note as I click "Section 3" afterward, it momentarily jumps to highlight "Section 1" before sliding down through the other items.

It appears as though the window needs to scroll up an additional pixel or three to trigger activation of the correct menu item. It only occurs when scrolling up; I have never seen the issue when clicking an item that scrolls down.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions