Site logo

Archived topic

Touch events - Primary Menu - a11y.min.js

12 replies · Started by Ryan on June 24, 2019

Viewing posts 1–13 of 13

Hello,

I'm having difficulty with users not able to navigate with the primary menu bar on mobile devices. After a little digging I believe I've narrowed it down to this file:

generatepress/js/a11y.min.js

I used Chrome Developer Tools to simulate a mobile device that is large enough that the menu bar doesn't collapse (the collapsed menu works fine) and found that the issue still exists there as well. I'm getting this error whenever I click on a menu item. Typically, you need to click the top menu item twice for the dropdown to apepar, then if you click anything in the dropdown it will just close it without redirecting.

Uncaught ReferenceError: closeDropdown is not defined
at HTMLLIElement.<anonymous> (a11y.min.js?ver=2.3:formatted:42)
(anonymous) @ a11y.min.js?ver=2.3:formatted:42

I've attempted defining the variable by adding this to the non-minified and then minifying it again:

var closeDropdown;

No luck there. It prevented this error from popping up but I got a different error related to the this.classList.remove("sfHover"). I believe it was saying that "this" is undefined.

Any help with getting my menu to work for mobile items would be much appreciated.

Thank you!

Thank you so much for the quick reply!

I've replaced a11y.min.js in /generatepress/js and it seems to behave as expected now.

Thanks so much for your help Tom!

Awesome! Thanks for letting me know :)

Hi Tom, I have (nearly) the same problem and replaced the file with the 3.2.1 version but still no luck. Would you please have a look? I don't see the JS error messages, just nothing happens when clicking top menu.
URL: flowerracket EN site

It looks like the Secondary Nav isn't opening on mobile. I can't replicate on my side, so make sure you're using the latest version of everything, and disable your plugins one by one to check for conflicts.

Hey Damiaan van Vliet,
I click on your top navigation and it is taking me to the new urls with different translations. Could you let me know what plugin you are using for translations? Is that PolyLang?

Thanks for reply. Will do that @Tom and will let you know later on which is the culprit.

@Ryan, thanks for asking; yes I use on that site PolyLang. Normally I use WPML or I also used a Multi-Site but in that case PolyLang.

@tom I disabled all plug-ins except GP Premium of course. Same problem.
I enabled debugging and got an error message:
"Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; WPAlchemy_MetaBox has a deprecated constructor in /domains/websitename.nl/public_html/wp-content/plugins/gp-premium/addons/generate-sections/inc/wpalchemy/MetaBox.php on line 55"

Hey guys,

Just FYI, I noticed later yesterday and same today that some devices still are showing that issue if cache hasn't been cleared on that device (very easy to forget about this for mobile devices).

Damiaan - that's an incredibly old version of GP Premium. You'll definitely want to update to the latest version.

Ah Tom thanks! So that's the problem.
I did not notice the version info but have updated all plug-ins and themes so thought I have everything updated.

I will manually update GP Premium and I am sure that the problem than is resolved ;-)

That should definitely fix it :)

This archived topic is closed to new replies.