-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
ScrollReveal not working on iOS Chrome [solved v3.0.6] #196
Comments
It appears to be working. Note: Chrome on iOS however, does still pause animations during scroll. This behavior can be seen on many mobile browsers, as scroll event handling is postponed until the client has stopped scrolling. Mobile Safari only recently changed to support event handling during scroll as of iOS 8. |
I just tried it again after updating to Not working both in my own project and on the sample site https://scrollrevealjs.org/ |
Hmm, @jmalatia it's not working for me either now… bah, okay I will look into this again. (I need a good way to debug mobile browsers!) |
how about compatibility of V2.x in mobile browsers? |
@blackSnail Version 2 appears to work fine in Chrome: https://scrollrevealjs.org/legacy Which is actually confusing, since the core logic is strikingly similar. I just need a remote inspector to look through the ScrollReveal instance and any errors to figure out why Version 3 isn’t working properly in iOS Chrome. (I’m looking into setting up weinre) |
@jmalatia Sometimes when it loads, it works… but most times it seems not to. This is such a confusing bug! I’m trying to use weinre to debug it remotely, but I haven’t been able to connect to phone to my local network… v3 also seems to fail on Windows Phone in my tests, but v2 does not. I don’t know where v3 differs so greatly in behavioral logic that it breaks! @AyanGhatak If you could help out with this, it would be awesome! |
@jmalatia @blackSnail It seems the event throttling flag being outside ScrollReveal.prototype.handler = function( event ) {
if ( !sr.blocked ) {
- sr.blocked = true;
- _requestAnimationFrame( sr.animate );
+ _requestAnimationFrame(function(){
+ sr.blocked = true;
+ sr.animate();
+ });
}
}; Had to debug the old fashioned way—trial and error, save to server and refresh—but the latest master has this change and soon I will include this in the next release. I’m still looking into #208, as I believe Windows Phone to be broken in Phew! 🙇 |
Hey @jlmakes Things still don't work in the same manner as iOS Chrome and mobile Safari, even after making the changes you suggested in 4b10dea. @jmalatia @blackSnail Correct me if I am wrong! Let me rephrase the exact issue we are facing... Things don't animate until the scrolling part is done in iOS Chrome. Whereas in mobile Safari we find animations occur during scrolling. In iOS Chrome, the scroll event is fired at the end of the scrolling. So unless the full scrolling is completed, the callback for the Partial Workaround?What I saw instead of scroll event, if we used touchmove in mobile devices and it was good. the handler callback was getting called. But.... There is again another bug for iOS Chrome: The workaround are the temporary findings and needs thorough validations. |
The bug this issue originally referenced was in reference to reveals not occurring at all within iOS chrome after the initial load.✨ 🚑 This has been fixed in Thanks for taking the time @AyanGhatak. What you’re talking about is a long standing behavior of mobile browsers (#48 #101) and scroll event handling. As I understand, iOS 8 was the first browser that evolved to trigger scroll events during scrolling. The behavior you describe—where scroll events don’t fire until scrolling is complete—is not a bug with ScrollReveal, but a limitation of some mobile browsers. For example, this was posted in 2012: On-Scroll Event Issues on Mobile Browsers Relevant Excerpt:
I don’t recall this, but it seems I attempted something similar in an earlier release (#48) but the browser still paused painting during |
I hate to do this but I'm still seeing the problem with version v3.0.8 on ios 9.2 / chrome. |
@walkandre there was an issue when checking CSS support with patch 8. Please update to |
I should have responded before, my bad. @jlmakes I updated my project after you released v3.0.6 and tested with the revised version and it worked great! Thanks for the speedy fix and keeping us updated during the process... much appreciated! @walkandre, I just updated my project to One thing I have noticed when testing on iOS (either Safari or Chrome) is that when things start to act weird (especially with pages that have animations or transitions that I have refreshed the page a lot on), I close all open web browser windows and then go back to the main iOS home screen and double-click the home button and throw up Safari and/or Chrome to release them from memory and then reopen the app and try again—then usually I get what is expected and the bad/weird behavior is gone. |
My pleasure @jmalatia, thanks for helping out! 🙇 By the way, thanks for searching and commenting on an existing issue @walkandre! |
@jlmakes thanks for the awesome library! btw you should take a look here: https://developers.google.com/web/tools/chrome-devtools/debug/remote-debugging/remote-debugging?hl=en the link explains how to remote debug ios and android devices. it's pretty handy. |
Probably a related issue, but after testing the demo website using BrowserStack, I can confirm it doesn't work under Safari 10.1 (included, and older versions). This Safari version is still widely used on some older Macs. |
Sample site https://scrollrevealjs.org/ not working on iOS Chrome. iPhone or iPad iOS 9+.
The text was updated successfully, but these errors were encountered: