Open desmochai opened 9 years ago
@aqeelb, did you solve this?
I think I found the solution, although I didn't test it on any physical devices yet:
Just change this line var scrollTop = e.detail.scrollTop
to this var scrollTop = e.detail ? e.detail.scrollTop : e.target.scrollTop
, on the scroll event(:279)
@Narayon :+1:
Hi, I tried this solution and it's working, but the scrolling smoothness is very bad. Chrome gives me a warning in the console : Deferred long-running timer task(s) to improve scrolling smoothness. See crbug.com/574343.
Any idea why this this solution gives me a very slow application ? I'm working on an Android Tablet, Galaxy Tab S, 6.0.1).
I'm guessing that's because the plugin is animating the top or bottom of the content, to compensate the translate of the header.
Animate anything rather then transform and opacity will be a performance problem.
I end up adding css classes to the elements, making a one time animation, rather then partial animations on scroll. It's not perfect, but it reduces the jank and suits my needs.
You can try using the FLIP technique, by Paul Lewis.
Share your solution if you give it a try.
Hi, I tried @Narayon 's solution but it only works while I'm touching device. I found that unlike web browsers, native devices can only detect scroll event while I'm touching it. So, when I scroll up to the header, the header shows up a few seconds later since it detects the scroll position when it stops. I am testing iOS devices. If you have any idea ! please help me out !