WAIT: Navigation dropdowns not working on initial page load

Browser: All browsers
OS: macOS
URL: https://wordpress-989347-5536398.cloudwaysapps.com/

Not sure if this constitutes as a bug, but I am using WP Rocket on my site and specifically the feature to delay script execution until interaction. I am excluding all internal scripts from this list to avoid bugs (including bricks.min.js).

For some reason, though, it looks like the ‘mouseenter’ event isn’t being attached to the list items in my navigation element in the header until after the user interacts, despite the event listener being added in the bricks.min.js file, and this is loading before any interaction (from looking in the network tab in browser dev tools).

Is there a reason why these events aren’t attached until all the other external scripts are loaded?

Any help is appreciated!

Hi @josh_mitch,

if I understand this correctly, then I’m leaning more to the no-bug territory. We add the event listeners to the page on DOMContentLoaded, so they should be added.

If you turn off WPRocket, just to test it, does it work then? If yes, are there any other settings in WPRocket you can toggle?

Matej

Hi @Matej thanks for your reply. Yeah you’re probably correct about it not being a bug.

Yes, disabling WP Rocket fixes the issue. I thought adding bricks.min.js to the exclude list would fix the issue but perhaps not although WP Rocket shouldn’t be causing any conflicts to DOMContentLoaded right? Maybe I’ll need to get in contact with WP Rocket support