-
Notifications
You must be signed in to change notification settings - Fork 822
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 Safari on iPad regarding onBottom #307
Comments
This issue renders the library unusable for a lot of people. Any chance of a hotfix, @WickyNilliams? |
Same thing on an iPhone XS on the latest iOS 12.2 beta. |
Just tested on iPad 12.1.1 and while the bounce seems to mess up the timing, once the window "settles" at the bottom, the menu does move off the screen. Is it just the delay that's the problem? |
The issue is that it seems it does not always call the |
@hacknug I'm not sure that this is the same problem that the op started this thread with. The |
@acahir it should not hide but move to the top to fill the empty space left by |
I don't have an iOS device, so I am not able to debug this.
|
There are many issues related to ios, consider this suggestion. This might help all the headroom.js users |
What are these "many" issues? |
https://github.com/WickyNilliams/headroom.js/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+ios many may be a 'overkill' ed word |
Is anyone resolved it ? |
I fixed this issue by setting a very small tolerance in the options object: {
tolerance: 1
} Tested on Safari on an iPhone 11 (iOS 14.3) and a simulated iPad 6th (iOS 11). |
We found that toggling the "headroom--bottom" class in Safari on the newest iPads does not work properly.
After some investigation i found, that the calculation
currentScrollY + this.getViewportHeight() >= this.getScrollerHeight()
(https://github.com/WickyNilliams/headroom.js/blob/master/src/Headroom.js#L354) is never true.This may be caused by debouncing and therefore not getting the latest - and biggest - scroll position. Most of the time it only misses a few pixels (2-10pixels).
I created a simple example to demonstrate it:
Demo: https://1vpqx1w87.codesandbox.io/
Code: https://codesandbox.io/s/1vpqx1w87
Tested on iPad (iOS 12.1) and Simulated iPad (6th generation and iOS 12.1)
Please let me know, if we can help you in any way.
The text was updated successfully, but these errors were encountered: