- This topic has 8 replies, 2 voices, and was last updated 7 years, 9 months ago by
RobertK448.
-
AuthorPosts
-
January 19, 2018 at 5:21 pm #130143
RobertK448
ParticipantHi,
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,
RobertJanuary 20, 2018 at 11:37 pm #130185Pratik
ParticipantHi @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,
PratikJanuary 21, 2018 at 2:16 am #130200RobertK448
ParticipantHi 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,
RobertJanuary 24, 2018 at 6:25 am #130446RobertK448
ParticipantUpdate:
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,
RobertPS: 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.
January 26, 2018 at 6:59 am #130578RobertK448
ParticipantCould 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,
RobertJanuary 26, 2018 at 7:37 am #130579Pratik
ParticipantHi 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,
PratikJanuary 26, 2018 at 8:10 am #130580RobertK448
ParticipantHi 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,
RobertJanuary 26, 2018 at 11:11 pm #130611Pratik
ParticipantGreat 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,
PratikJanuary 27, 2018 at 1:39 am #130616RobertK448
ParticipantSounds great, Thank you!
Regards,
Robert -
AuthorPosts
- The topic ‘Mobile navigation not clickable’ is closed to new replies.
