adobe-accessibility / Accessible-Mega-Menu

A demonstration of how to implement a keyboard and screen reader accessible mega menu as a jQuery plugin.
Apache License 2.0
605 stars 199 forks source link

Chrome bug breaking top level item links on touchscreen PCs #31

Open peterc opened 8 years ago

peterc commented 8 years ago

Sorry if this is the wrong place, but I spent hours yesterday digging into an issue. I am mostly reporting so others encountering this can feel a little more sane.. :)

Random Windows users were complaining that top level menu items were not clickable anymore. That is, they would not follow to their usual links, all they would do is open and close their submenus (or do nothing if they didn't have submenus).

After significant amounts of debugging, we found that they were all users with Windows devices with touchscreens (both laptops and desktops). "isTouch" was coming up as true on those devices and, for some reason, Chrome 47 is now triggering "ontouchstart" events even for mouse clicks. We believe this latter part is a bug in Chrome, but either way, it affects the accessible mega menu's operation when in "touch" mode.

Our workaround has been to hard code isTouch as false and now everything works fine, even on iOS and Android as both Safari and Chrome seem to be smart enough to deal with initial clicks representing hover states.

Philippe-dev commented 8 years ago

I am experiencing the same bug but with all touch devices. The demo page does not work either for top level items where links cannot be followed.

@peterc : could you lease explain how to "hard code isTouch as false"? I tried in several places, but so far to no avail

Nfinished commented 8 years ago

@peterc Could you elaborate on how and where to set isTouch to false?

peterc commented 8 years ago

It's been a while now so I can't remember, but I seem to recall I merely searched the code for isTouch and when it was checked, I forced it to be false.

llahnoraa commented 8 years ago

+1

It doesn't work on iPad or any of the tablet devices. This needed to be resolved as soon as possible.

This is a great plugin, btw, but needed to be fixed :)