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

Problems with Mobile Safari #2

Open
richardscarrott opened this issue Oct 24, 2022 · 2 comments
Open

Problems with Mobile Safari #2

richardscarrott opened this issue Oct 24, 2022 · 2 comments

Comments

@richardscarrott
Copy link

Thanks for the hook, really useful.

I'm seeing issues on iOS where the reported value of stickyRef.current.getBoundingClientRect().top is often incorrect by quite some margin.

I see you're handling cases where it's negative due to rubber banding, but I've also observed incorrect positive values; I think it might have something to do with when the Mobile Safari browser UI grows / shrinks. Not sure if you've run into this / know of a fix?

There's a bug filed for the same problematic behaviour but with position fixed here https://openradar.appspot.com/radar?id=6668472289329152

I modified their jsbin slightly to dump out every value reported https://output.jsbin.com/divoyud

@ranbena
Copy link

ranbena commented Mar 23, 2024

@richardscarrott did you find any workaround?

@lemps
Copy link

lemps commented Jan 8, 2025

I debounced the sticky value with a useDebouncedValue hook and achieved acceptable behaviour

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

3 participants