Skip to content
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

Safari scroll bouncing causes white space to appear #195

Open
matheusgrieger opened this issue Dec 24, 2020 · 18 comments
Open

Safari scroll bouncing causes white space to appear #195

matheusgrieger opened this issue Dec 24, 2020 · 18 comments

Comments

@matheusgrieger
Copy link

matheusgrieger commented Dec 24, 2020

When scrolling too fast or too much to the top of the page in desktop Safari, it shows an extra white space as is expected, but that locks the header out of place, as can be seen in the image below (notice the highlighted element is actually below the highlight).

Does anyone knows a way to fix this? Seems related to #89.

image

Edit: just saw that #90 aimed to fix this but it still happens to me on 3.1.0

@LiteSoul
Copy link

LiteSoul commented Dec 29, 2020

The same is happening to me on Safari. Using the latest react-headroom release 3.1.0 as well as 2.2.8.
I don't know why #90 no longer fixes it.

@cheezywhiz
Copy link

cheezywhiz commented Jan 4, 2021

Just started seeing this behavior after upgrading to Big Sur/Safari 14. Weird thing is that the mouse still responds as if the header is in the right place.

oops

I'm using <Headroom disable={isSafari && !isMobile}> until there's a fix.

@tannerbaum
Copy link

We also have been experiencing this for a few months now. Observed that is wasn't an issue in Safari 13, only in 14.

@matheusgrieger
Copy link
Author

I'm starting to think that it's a Safari glitch, not related to the library itself.

@meaghanbass
Copy link

@cheezywhiz Can you share how you got isSafari and isMobile?

@cheezywhiz
Copy link

@cheezywhiz Can you share how you got isSafari and isMobile?

@meaghanbass I'm using https://www.npmjs.com/package/react-device-detect for that

@smeriwether
Copy link

I was seeing the same issue but was able to get this working by passing in position: fixed to the style prop. My component now looks like this:

<Headroom style={{ zIndex: 100, position: "fixed" }}>
...
</Headroom>

@cheezywhiz
Copy link

@smeriwether amazing! confirming that this works. thanks!!

@opolo
Copy link

opolo commented Mar 19, 2021

Struck by the same problem in production. Setting position fixed solves it, but ruins all the "animations" on the header, which kinda moots the point of using headroom for having a visually pleasing behaving header.

Have anyone found any other fixes to this?

@endymion1818
Copy link
Collaborator

Is this still happening with v3.1.1?

@cheezywhiz
Copy link

seems to work fine now with 3.1.1

@matheusgrieger
Copy link
Author

Yes, this is solved now. Thanks guys!

@chaddjohnson
Copy link

This is still a problem with react-headroom 3.2.0 in Safari.

@endymion1818
Copy link
Collaborator

Hello @chaddjohnson please could you let me know what version of Safari you're on

@chaddjohnson
Copy link

chaddjohnson commented Apr 14, 2022

@endymion1818 Version 15.1 (17612.2.9.1.20)

BTW, is your username a Hyperion reference?

@endymion1818
Copy link
Collaborator

Ok thanks.

Yes it is! I've been fascinated with John Keats ever since I read Dan Simmons' novels some years ago.

@bamerf
Copy link

bamerf commented Apr 26, 2022

This is still an issue with react-headroom 3.2.0 and Safari 15.4 (17613.1.17.1.13)

@endymion1818
Copy link
Collaborator

Well, darnit.

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

No branches or pull requests

10 participants