WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 2 years ago

#30686 assigned defect (bug)

Twenty Fourteen/Thirteen/Twelve Navbar submenu behaviour

Reported by: trenzterra Owned by: davidakennedy
Milestone: Future Release Priority: normal
Severity: normal Version: 4.0.1
Component: Bundled Theme Keywords: needs-patch
Focuses: Cc:

Description

As you all may know, both 2014/13/12 themes require you to hover over a menu item in order to access the submenu item. This isn't a problem for desktops but for touchscreen devices this may pose a problem.

I notice this problem has largely been addressed at least for the 2013 and 2012 themes for Android, iOS and Windows Phone devices (see https://core.trac.wordpress.org/ticket/24767#comment:35). However, on my Windows 8 tablet, it still registers the first tap as a click on both Internet Explorer 11 and Mozilla Firefox (Google Chrome works fine). I believe both browsers somehow do not declare whether the device is a touchscreen.

In addition, for the 2014 theme, the (partial) fix isn't even implemented (I don't know how it got implemented for both 2013 and 2012 themes but was overlooked for 2014), therefore you will still find it hard to click on sub-menus if you're using an Android device.

As for the 2013 and 2012 themes, I know that the Windows 8 tablet userbase is comparatively small, but I believe it will grow over the years. I'm not sure how this can be fixed in the mean time (since the hover/click behaviour seems to rely on a touchscreen detection), but I would like to suggest the following:

  • In the Twenty Fifteen theme, this issue seems to be fixed once and for all, as the dropbox arrow next to the menu item is a separate link. Clicking on the arrow itself will maximise/minimise the sub-menu, instead of linking you to the menu item itself.
  • However, the Twenty Fifteen theme's menu is only available at the side, instead of the top.
  • Thus, if the improvements made in the Twenty Fifteen theme could be backported to Fourteen, Thirteen and Twelve. It would be great!

P.S. I'm not sure what to classify this ticket under, but I guess I will leave it as a 'bug' since the hover and click issues have not been completely addressed, especially on the Twenty Fourteen theme. The same behaviour occurs on WordPress 4.0.1 and 4.1 RC.

Change History (8)

#1 @SergeyBiryukov
4 years ago

  • Component changed from General to Bundled Theme

#2 @lancewillett
4 years ago

  • Keywords early needs-patch added
  • Milestone changed from Awaiting Review to Future Release

Thank you trenzterra for this ticket, we'll address this for the 4.2 release early next year.

This ticket was mentioned in Slack in #core-themes by lancewillett. View the logs.


3 years ago

#4 @trenzterra
3 years ago

Hi,

I think the key in fixing this would be using pointerevents instead of touchevents: http://blogs.msdn.com/b/ie/archive/2014/07/31/the-mobile-web-should-just-work-for-everyone.aspx

I thought of this once again after my bug was mentioned for #31762 and I saw ontouchevent being utilised. Ontouchevent isn't supported by IE, and perhaps Firefox for desktop.

I was wondering if this issue is still being considered for 4.2? I wish I could help more but I have little javascript knowledge at best.

Thank you.

Edit: I did more research and touchevents is currently only supported on Chrome for desktop devices. Firefox added it for a while and removed it later due to some scrolling issues, while ie10/11 does not support touch events too on the desktop. Thus, as an interim measure, perhaps you could change the drop down arrow to show the submenu instead of linking it together with the menu link. This is how it currently works on the twenty fifteen theme. In addition, code in pointerevents if you want because Chrome and Firefox are working on implementing this feature in future and it would probably supersede the touchevents standard eventually. With the number of touchscreen laptops growing, I think implementing this would be very useful.

Last edited 3 years ago by trenzterra (previous) (diff)

#5 @lancewillett
3 years ago

I think we'll need to move this to 4.3. If someone can start work on a patch, it'd be helpful to get it moving soon into the next release.

#6 @karmatosed
2 years ago

  • Keywords early removed

#7 @karmatosed
2 years ago

  • Owner set to davidakennedy
  • Status changed from new to assigned

#8 @davidakennedy
2 years ago

There's some work happening in #30575 to improve this in Twenty Fourteen. Once finished, it could probably be ported to at least Twenty Thirteen and maybe Twenty Twelve.

Note: See TracTickets for help on using tickets.