Fix scrolling when using -webkit-overflow-scrolling:touch;#5
Fix scrolling when using -webkit-overflow-scrolling:touch;#5KZeni wants to merge 1 commit intoiclanzan:masterfrom
Conversation
This is a great plugin, but I want my mobile visitors to still get the smooth scrolling that `-webkit-overflow-scrolling:touch;` provides. I applied that to the scrolling element's CSS, but it then made the headers not update properly and generally became glitchy. I found that a quick fix to this was to have this set the headers to be `position:fixed;` rather than `position:absolute;`. The scrolling is now perfectly smooth and the headers still attach themselves as you'd expect. I'd like to see this implemented in the main distribution of this since I'm sure other people will want to have sticky headers and smooth scrolling. Thanks!
|
I will review this as soon as I have some spare time. I remember there being no way of making it work with |
|
I don’t think position fixed is a good work around though. |
|
Based on the multiple things I've tried, this seems to be the only thing that addresses the issue and it's a small change. What makes it not a good workaround? My thinking is, those elements are effectively If it's a matter of browser compliance, then I'd consider adding this small change as an option that's set when you call the script (ex. Edit: Come to think of it, I can see how setting it to be I'd love to hear your thoughts. |
This is a great plugin, but I want my mobile visitors to still get the smooth scrolling that
-webkit-overflow-scrolling:touch;provides. I applied that to the scrolling element's CSS, but it then made the headers not update properly and generally became glitchy.I found that a quick fix to this was to have this set the headers to be
position:fixed;rather thanposition:absolute;. The scrolling is now perfectly smooth and the headers still attach themselves as you'd expect.I'd like to see this implemented in the main distribution of this since I'm sure other people will want to have sticky headers and smooth scrolling.
Thanks!