Skip to content
This repository was archived by the owner on Sep 5, 2025. It is now read-only.
This repository was archived by the owner on Sep 5, 2025. It is now read-only.

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

@mtomas7

Description

@mtomas7

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions