Skip to content

WP Rocket delay JS execution interrupted click event #7296

Description

@kartikpotenza

Describe the bug
I am facing one issue i don't know how to find solution for the same i am using the WP rocket with the "Delay JavaScript execution" enabled and also exclude some JS files to prevent the bugs.

Now what happening is all the delayed JS loads first then my code that i added on click event executes. For example when i click on mobile filter button it opens the filters popup but since Delay JS Execution enabled on that click all the JS loads first then my code ( on click event ) fires in the Mobile. So due to that it takes 5-6 seconds to open the popup instead of quick open.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://woocommerce-762794-2848808.cloudwaysapps.com/
  2. Open it in mobile view or in actual mobile
  3. Click on the benefit - https://prnt.sc/roL9KH8O475i it will take time to load
  4. Now click again it will load faster

Expected behavior
It should first execute Click event code then load all the JS, I hope that there is some hook or something that i can use to exclude my code completely from this delay same issue i am facing with the Mobile menu.

Here is the sample video - https://screenrec.com/share/KLQ6ep9YTF

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions