[Resolved] Touch events – Primary Menu – a11y.min.js

Home Forums Support [Resolved] Touch events – Primary Menu – a11y.min.js

Home Forums Support Touch events – Primary Menu – a11y.min.js

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #939651
    Ryan

    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!

    #939778
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    This is a current bug in 2.3 which will be fixed in 2.3.1.

    If you’d like to test the fix (I’d appreciate it), you can see the changes here: https://github.com/tomusborne/generatepress/compare/release/2.3.1

    If you want to simply replace a11y.min.js, you can find the updated version here: https://github.com/tomusborne/generatepress/blob/release/2.3.1/js/a11y.min.js

    Thanks!

    #939790
    Ryan

    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!

    #939791
    Tom
    Lead Developer
    Lead Developer

    Awesome! Thanks for letting me know πŸ™‚

    #940184
    Damiaan van Vliet

    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

    #940758
    Tom
    Lead Developer
    Lead Developer

    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.

    #940915
    Ryan

    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?

    #941581
    Damiaan van Vliet

    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.

    #941584
    Damiaan van Vliet

    @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”

    #941633
    Ryan

    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).

    #942039
    Tom
    Lead Developer
    Lead Developer

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

    #943117
    Damiaan van Vliet

    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 πŸ˜‰

    #943132
    Tom
    Lead Developer
    Lead Developer

    That should definitely fix it πŸ™‚

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.