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

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

Comments

Projects
None yet
4 participants
@mtomas7
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!

@pixelstrolch

This comment has been minimized.

Show comment
Hide comment
@pixelstrolch

pixelstrolch May 24, 2016

Contributor

+1

Contributor

pixelstrolch commented May 24, 2016

+1

@sixhours

This comment has been minimized.

Show comment
Hide comment
@sixhours

sixhours May 26, 2016

Contributor

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

Contributor

sixhours commented May 26, 2016

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

@sixhours sixhours added Has Patch and removed Second Opinion labels May 26, 2016

@sixhours

This comment has been minimized.

Show comment
Hide comment
@sixhours

sixhours May 26, 2016

Contributor

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

Contributor

sixhours commented May 26, 2016

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

@mtomas7

This comment has been minimized.

Show comment
Hide comment
@mtomas7

mtomas7 May 26, 2016

Contributor

It works on Nexus 7 Chrome! 👍

Contributor

mtomas7 commented May 26, 2016

It works on Nexus 7 Chrome! 👍

@sixhours

This comment has been minimized.

Show comment
Hide comment
@sixhours

sixhours May 26, 2016

Contributor

This has been fixed and merged in #900.

Contributor

sixhours commented May 26, 2016

This has been fixed and merged in #900.

@sixhours sixhours closed this May 26, 2016

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