Pop up modal delay in mobile

I have a pop-up modal in the home page. It’s working fine in desktop, it’s popping up after 20 sec delay. But it’s not popping up after 20 sec in mobile but 23 or 24 sec. Why this problem matters is I added a no scroll custom code and put delay of 20 sec. so in mobile version the custom code made no scroll enabled after 20 sec, but the native webflow pop up comes after 23 sec.

Here is my website link- Webflow - Little's Exceptional Site

Link them together.

Your custom code that is triggering the noscroll, have it also invoke your modal by clicking a hidden button, rather than your interaction delay.

This will ensure that the events occur together, and that if you later want to suppress them, that they suppress together.

Hi, thanks for the solution. Actually I dont know coding, can you plz teach me in details what you trying to say, it would be nice. Thank you.

See the custom code is correct and it is not making any issue , I remove the code and only keep the webflow native interaction, but in mobile still it is popping up after 26 to 27 sec(should be pop up after 20sec).

You’ll need to do a bit of restructuring of your modal and interaction trigger, but otherwise you’re just extending the code you’ve already written for the 20-sec-delayed no scroll code.

If you didn’t write that, and don’t have the developer on the team anymore, you can direct message me for my rates, I do a lot of coding work for Webflow designers & agencies.

Actually, I am the developer, I just need suggestion why I am getting this problem. As I said the problem is with the native webflow interaction as I removed the code and still I am getting the issue. Hope you understand.

In terms of the timing issue, it’s happening because you have two different timers running. One is part of the interaction, and one is in your noscroll trigger code. When the page loads those timer start at different points, and may even be using different timer mechanisms.

Since you need to have those events happen simultaneously, you want to remove the delay from your interaction and make it button triggered instead. Then have your noscroll trigger event “click” that button at the same time as you apply your noscroll code.

This will synchronize them.