Skip to content

unstick not called if element is origianlly flush with top of page #110

@mkstix6

Description

@mkstix6

I have my menu bar that is the first element within the body and flush with the top of the viewport.
Scrolling down the page activates the sticky
But scrolling back up to the top does not unstick the element.

Usually this wouldn't be a problem as the element is exactly where it would be (except fixed) but i have some other behaviour that relies on the unstick element to change the position and size of other elements.

I can hack fix the issue by giving the body a 1px top margin.

Note: Safari's elastic scrolling strangely fixes the issue. I would wager because Safari can report scroll values in the negative.

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