Skip to content

Fix: Delay unfix state change to prevent Safari glitch #194

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

olerichter00
Copy link
Contributor

@olerichter00 olerichter00 commented Dec 14, 2020

Problem

The header doesn't stay at the top of the page when scrolling to the top of the page quickly with Safari on MacOS.

Related Issue

#185

Proposed Change

Delay unfixed state change with setTimeout().

New Behaviour

Glitches are not happening anymore, although the header still disappears for a few milliseconds when scrolling to the top quickly.

@olerichter00 olerichter00 marked this pull request as ready for review December 14, 2020 22:15
@vitordino
Copy link

vitordino commented Mar 5, 2021

i can confirm this worked for me, will try to create 2 code sandboxes to show the fix — when i have time

might work using request animation frame as well

@opolo
Copy link

opolo commented Mar 19, 2021

Works for us too, so could be a solution, although I can confirm the same that Vitordino wrote. @KyleAMathews You are more an expert of whether this is an acceptable fix though :)

@vitordino
Copy link

vitordino commented Mar 19, 2021

published this change on @vitordino/react-headroom package for now

@endymion1818
Copy link
Collaborator

Could anyone using @vitordino's package report back to me on whether #134 is recurring now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants