Archived topic
Mobile menu item highlighted upon click
6 replies · Started by Andrew on November 9, 2021
Hello,
I just enabled the "Delay javascrips execution" setting on WP Rocket. I ecluded the following files per WP Rocket's instructions https://docs.wp-rocket.me/article/1560-delay-javascript-execution-compatibility-exclusions?#generatepress:
/generatepress/assets/js/main.min.js
var generatepressMenu
/gp-premium/menu-plus/functions/js/offside.min.js
offSide
The menus and search box are working fine, but I noticed that when I tap the mobile menu, the first menu item is highlighted with a blue border. It happens when I tap on the menu before scrolling but seems to be okay if I scroll and then tap the menu.
I sure this has to do with the "Delay javascrips execution" setting in WP Rocket, but I'm not sure what to do since I exluded the GP files per there instrcutions.
I've tried clearing all cache several times and I'm still seeing the issue.
Is there anything else I need to exclude?
Do I need to exclude any GP files from the "Minify javascript files" or "Load Javascript deferred" sections of WP Rocket? Those were already enabled without excluding GP files and I wasnt having any issues.
Thank you!
Andrew
Hi Andrew,
I checked your site on my phone using Safari and Chrome, didn't see the issue on both browser.
Have you gotten it fixed already?
Let me know :)
I'm still seeing the issue. I tried both Chrome and Safari on iphone 12. Here's a screenshot: https://drive.google.com/file/d/1WiMCCGb38eG2xHwNpX5XcGq1tvjRW4x-/view?usp=sharing
I noticed that if you first click on the menu, it's there. but if you X out and click again, it disappears.
I also noticed that the search icon on mobile and jump links/anchor links at the top of posts on mobile require 2 taps to work.
To have a baseline, does this issue occur when WP Rocket is completely disabled?
Also, can you try doing a wildcard exclusion instead?
Example:
/wp-content/themes/generatepress/(.*).js
/wp-content/plugins/gp-premium/(.*).js
I tried that wildcard exclusion and the same issues persisted.
I just disabled “Delay javascripts execution” and the problems went away. I'm going to keep it off for now and contact WP Rocket. There must be some other conflict happening.
I just disabled “Delay javascripts execution” and the problems went away. I’m going to keep it off for now and contact WP Rocket. There must be some other conflict happening.
Delaying execution for these script won't be necessary since these scripts are enqueued on the footer anyway. :D
Let us know how it goes.