SOLVED: Run Once Interactions Looping

Browser: Chrome 110
OS: macOS / Windows / Linux / etc.
URL: Link to a page that illustrates this issue
Video: Short screen recording that illustrates this issue (free tool: jam.dev)

[Please describe this bug in as much detail as possible so we can replicate & debug this bug]

Hi

Using Interactions as so, based on scrolling to element and to fire where I add a class:

I tried ‘enter viewport’ as well, but on some instances, like on here, they just keep looping on scroll and feel quite buggy. Is this normal, and is there something else I should be doing? https://whitespace.agency/services/digital-marketing/

Oddly some uses of it work well, and others are just very glitchy.

TIA

Also visible on here, they feel quite skittish: Handi App - White Space Advertising

Hi Rob,
Thanks so much for your report!

Unfortunately, I cannot reproduce the issue. Would you be so kind as to send temporary login credentials and a link to this thread to help@bricksbuilder.io using the email address you used during the purchase?

Best regards,
timmse

Thanks Stefan. I’ve just sent that over now.

Thanks for the access data! There is indeed something strange with the “run only once” setting, if the interaction is directly applied to the loop item. It seems as if the interaction runs for all of the items first and then independently for each item again.

If I put the interaction on the ul and choose each li as selector (see " Digital Marketing Services“ ul/li), the run only once setting works as far as I can tell.

However, you will then no longer have this staggered animation effect

The devs need to look at this in detail :face_with_monocle:

Sorry Stefan I missed this reply from you!

OK that makes sense and glad it’s not just me. Luckily I’ve used a class for it, so what’s the best bet for now - remove the interaction via Bricks and add the enter viewport code manually until this is solved?

This would at least be an alternative:

OK I’ll give that a go. So essentially it depends where the interaction is sat? I must admit the interactions confused me to death as you can attach it to a class, and if you create it on the class, then you can edit it. But if it’s created on the ID but still attached to run on a class, you have to them remember which ID you created it on to locate it.

Also sorry Stefan, on there at the top, I am not animating as UL/LI just divs https://whitespace.agency/services/

I have the animations running in various places. I am using BricksForge and GSAP, with pinned sections - I wonder if this is upsetting the viewport detection?

I was referring exclusively to these cards:

If you use the same interaction/class with the interaction in other places, it will of course be difficult to make an egg-laying wool-milk sow out of it as long as the problem persists :smiley:

1 Like

Thank you. Yes I was just trying to use fade-in-up (like I used to use in Oxygen or similar) to reveal animations on scroll so was trying to keep the classes to a minimum :slight_smile:

Is this something that will be looked into fairly soon do you think Stefan, or should I hold off for a bit?

Hi Rob,
We’ve fixed this issue in Bricks 1.9.5, now available as a one-click update in your WordPress Dashboard.

Changelog: Bricks 1.9.5 Changelog – Bricks
Please let us know if you are still experiencing issues.

Updated, thank you.

Are they not still firing for you multiple times and ignoring order coming in in order?

Hi Rob,
In my demo it works without any problems. What is the second trigger for in your case?

Hey @timmse

Thanks for the reply. That was for data-animate I was using as a fallback when this wasnt working, to add css to that rule as I was having to get it to add/remove the CSS based on scroll, so the animation did not loop?

In this instance no style is being added so that should affect anything, but I will remove it too.

If I add the condition to a class now, do I need to tell it to target the class, or will it add that condition to every class ?

Thank you

Removed that data-attribute bit (even though it wasn’t being used) on that page Stefan and still happening annoyingly. I have ticked run only once also :slight_smile:

If I look at the originally shared link and the interaction at Strategy, Performance, Creative, 
 it seems to work:

The question is where the difference compared to this:

You’re right there yeah, that’s a strange one in that case :confused:

I am using GSAP with Bricksforge, but that’s the same for both of those pages.

I used the add/remove attribute when in viewport before, in interactions, and that seemed to work. I was just hoping I could use the native one now but still seems a bit janky/re-reunning for whatever reason on the single work pages.

Unfortunately, as I said, I cannot reproduce the problem as I do not use Bricksforge. However, the first step would be to deactivate Bricksforge and see if it then works. If this is the case, please contact Bricksforge.