Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #130143
    RobertK448
    Participant

    Hi,
    we are redesigning our website and we found this really nice theme, which seems to be (almost) perfect for us.
    But now we have encountered one problem: In a multi-level main menu the submenu items are not clickable on my smartphone (Windows 10 Phone). When I tap on such a link, the menu just closes and nothing else happens.
    It seems that there is some JavaScript function which catches the click event (for closing the menu) and the actual link will not be clicked.
    On desktop PC, when I resize the browser to “smartphone dimensions”, it works correctly (tested with Firefox and Edge). Also on an Android smartphone it works.
    Can you tell me, which JavaScript function is called when clicking a submenu link? I would try to disable the “close menu” function to see if this will help.

    Regards,
    Robert

    #130185
    Pratik
    Keymaster

    Hi @robertk448,

    Can you post in your site url?

    Also, the support for Windows phone has been discontinued by Microsoft. The click event is same for parent and child menu so you can check cleanportfolio/assets/js/functions.min.js and its unminified version at wp-content/themes/cleanportfolio/assets/js/functions.min.js

    Regards,
    Pratik

    #130200
    RobertK448
    Participant

    Hi Pratik,
    of course. You can see it under http://test.fotoakteur.de/
    I have set the page to the unedited Theme (not my child theme) and disabled all plugins. But it’s still the same behaviour: On Windows Phone the submenu item links (i.e. “Kategorien” -> “Projekte”) doesn’t work.

    Regards,
    Robert

    #130446
    RobertK448
    Participant

    Update:
    After some research, first I disabled the closing of the menu, after click event. This shows me, that the links are also working on my phone, but only after a second “tap”. On the first “tap”, the menu item is just hovered.
    After that, I’ve noticed, that the “aria-haspopup” attribute is added by JavaScript to the menu items. So I disabled this line. After that, it worked perfectly!
    So what I’ve read about this “aria-haspopup” attribute, my windows phone seems to act completely correct! When this attribute is set to true, then the first “tap” should be just the same as “hovering” with the mouse on PC. At this point, the link should NOT be clicked. But obviously, this is not the wanted behaviour, because the first tap also triggers some JavaScript, which closes the menu. So I cannot do a second “tap”.

    I’m wondering, why this works on most other devices.

    So could you please fix this behaviour? I think the “aria-haspopup” attribute is not necessary on the menu items, because nothing happens on hovering (except the background-color-change). So there is no need to emulate any hovering, right? Or is there another reason for the “aria-haspopup”?

    Regards,
    Robert

    PS: Windows 10 Mobile is still supported! There will be no new features, so it’s not actively under development, but security patches are still published.

    #130578
    RobertK448
    Participant

    Could you please tell me, if this behaviour maybe will be changed in the Theme?
    Or do I have to fix this in my child theme?

    Regards,
    Robert

    #130579
    Pratik
    Keymaster

    Hi Robert,

    I apologize for late reply. Can you let me know the code snippet you edited and where, or is it something you added?

    Regards,
    Pratik

    #130580
    RobertK448
    Participant

    Hi Pratik,
    no problem. I’ve just commented out the following line in the /assets/js/functions.min.js

    //container.find( '.menu-item-has-children' ).attr( 'aria-haspopup', 'true' );

    In the unminified source file it’s line number 100.
    I think, this attribute makes no sense for this theme/this menu.

    Regards,
    Robert

    #130611
    Pratik
    Keymaster

    Great thanks. We will fix it and test it out before releasing the update. For now, you can comment that part out. If by any change the testing fails or our dev team disapproves it, I will let you know here with reasoning.

    If approved, you wont have to do anything.

    Regards,
    Pratik

    #130616
    RobertK448
    Participant

    Sounds great, Thank you!

    Regards,
    Robert

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Mobile navigation not clickable’ is closed to new replies.