Animation not always visible on iPhone

4 replies · opened Jul 12, 2020

Ccmwhite312Jul 12, 2020

I used the fade-up animation on some of the text. It works great on the desktop, but on the mobile, if I scroll slowly, the item(s) do not always appear. I can scroll further down and back up and then it will appear. I attached an example display. The temp address is jcs.formulos.com/index.html where the animation is not always working.

I'm using iPhone 10, and the browsers I tested were on safari and chrome. Let me know if you need additional information.

If you don't find anything next week that might resolve the matter, I'll go ahead and insert the no animation on mobile in the js.

Thanks,
Chris

SSemicolon WebSTAFFJul 13, 2020

Hello,

Thanks for providing more information and debugging steps for this issue. The bug appears to be with the Intersections Observer calling 1 Event on a 2 Animation Element simultaneously which is why the Animation Function is not triggered correctly. Consider replacing the existing optionsInOb Object in the js/plugins.animations.js File with the following Code:


let optionsInOb = {
	threshold: 0.5
}

This should fix the issue as we are not getting any more errors with this. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Ccmwhite312Jul 16, 2020

I replaced

let optionsInOb = {
rootMargin: '0px'
}

with

let optionsInOb = {
threshold: 0.5
}

but the issue is still there. If I scroll slowly or stop where the first part appears and stop scrolling - when I scroll further down, the other items doesn't show until I scroll past that section and then scroll back up. Let me know if you think of another possible solution. Meanwhile, Ill change the js setting back and disable animations on mobile.

Ccmwhite312Jul 16, 2020

Do I insert the script like below to cancel mobile animation on mobile? It doesn't seem to work. :(

if( $animationEl.length < 1 ){
return true;
}

if( $('body').hasClass('device-xs') || $('body').hasClass('device-sm') || $('body').hasClass('device-md') ) {
$animationEl.addClass('animated');
return true;
}

SSemicolon WebSTAFFJul 16, 2020

Hello,

We have checked this out and it appears to be working perfectly fine for us. Can you please provide us with a Live URL so that we can check out the exact issue and provide you with more assistance on this. Thanks for your Patience.

Additionally, if you are using the js/plugins.min.js File, make sure that you update the js/plugins.js File as well and then minify the Codes using this Website: https://javascript-minifier.com/ and then replace the codes in the js/plugins.min.js File with the new minified codes. You can find more ways to include Javascript here: http://docs.semicolonweb.com/docs/getting-started/javascript/ .

Do I insert the script like below to cancel mobile animation on mobile? It doesn’t seem to work. ?


if( $animationEl.length 

Yes, that's correct!

Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard