Preloader Bug on Safari

I am using a preloader on the site but on SAFARI make a conflict that makes desapear some Parallax js. Over Chrome work fine but on Safari hide elements until the window is resized or reload for second time.

With preloader. (White spaces)

Grabación de pantalla 2023-05-12 a la(s) 13.11.54

Without (Parallax working fine)

Grabación de pantalla 2023-05-12 a la(s) 13.12.57

I have tried defer, async etc etc. Any idea??

Any advice @patrick??

It’s weekend and our office is closed during the weekends, i.e. our team is not available.
Once Patrick reviews the issue on Monday he will reply to the topic.

Thanks :slight_smile:

What is the parallax js you are referring to? Is this a third party script? Do you have a link where we can check this page?

https://www.chapulink.com/

I upload on a testing server

I think there is probably a conflict between the preloader component and parallax plugin. I think it is related to the mentioned issue here: parallax not working in bootstrap tabs · Issue #168 · pixelcog/parallax.js (github.com). The parallax doesn’t initialize correctly when the content is initially hidden (which the preloader does). You can try to trigger a resize on the load event, on the body tag add onload="$(window).trigger('resize.px.parallax')".

No it don´t work. Any other idea?? but why over Chrome or other browsers work fine.??

I notice that when you inspect the element, on the console the function disappear. I dont know if this is the way App Connect works?

I think the parallax doesn’t like the page is hidden on load, when the page is hidden it can’t calculate the correct width/height.

The onload seems to be triggered just before the preloader, try adding an extra delay like waiting for the next animation frame.

onload="requestAnimationFrame(() => $(window).trigger('resize.px.parallax'))"

Another thing you can try is removing the .dmxCloak class from the css.

This method works

onload="requestAnimationFrame(() => $(window).trigger('resize.px.parallax'))"

I don´t get how but it work with this on body tag.

Thanks a lot.