Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable touch support for nav menu links with subitems as seen in TwentySixteen #957

Closed
mtomas7 opened this issue May 17, 2016 · 5 comments
Closed

Comments

@mtomas7
Copy link
Contributor

mtomas7 commented May 17, 2016

I'm sorry that I cannot directly contribute to this one as my JS skills are very poor. The problem is that normal menu (didn't test with mobile) cannot handle touch events for menu items that are links themselves.

To reproduce this, create a menu item (link to page, cat, etc.), add subitem, then try to expand the menu on a tablet. After clicking on menu item (link) submenu will be displayed for a very short time, until browser is redirecting to the parent item link.

This problem is solved in Twenty Sixteen and JS code is very similar. I was trying to make some changes to no avail :(

Another possible solution could be this:

http://osvaldas.info/drop-down-navigation-responsive-and-touch-friendly

There are some more code samples, but of course I would vote for the Twenty Sixteen implementation as we would have similar code among WP themes. Perhaps others already have some good working solutions?

Thank you!

@stebrech
Copy link
Contributor

+1

@sixhours
Copy link
Contributor

This should be handled in #666; the proposed patch needs testing.

@sixhours
Copy link
Contributor

#962 is the correct, most recent patch without conflicts.

@mtomas7
Copy link
Contributor Author

mtomas7 commented May 26, 2016

It works on Nexus 7 Chrome! 👍

@sixhours
Copy link
Contributor

This has been fixed and merged in #900.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants