Last modified: 2014-10-02 06:05:51 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T73424, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 71424 - CPB: Allow opening with touch when touchevent is supported.
CPB: Allow opening with touch when touchevent is supported.
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
VectorBeta (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Matthew Flaschen
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-29 18:25 UTC by Shivaji Varma
Modified: 2014-10-02 06:05 UTC (History)
8 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Top Dropdown menu (237.44 KB, image/png)
2014-09-29 18:25 UTC, Shivaji Varma
Details

Description Shivaji Varma 2014-09-29 18:25:46 UTC
Created attachment 16627 [details]
Top Dropdown menu

On my touch screen laptop, when i try to click on top dropdown menu, Instead of menu expansion, it is redirecting me user page.

I can't hover using touch screen, So i suggest you to remove hover property and replace it with click.
Comment 1 Jared Zimmerman (WMF) 2014-09-29 18:29:05 UTC
Thank for bringing this up, touch screen desktops are certainly an edge case for this ( the number of users accessing the desktop site from touch devices is extremely low) One of our planned updates, is to change the behavior of the compact personal bar on touch devices, as a fallback.
Comment 2 Matthew Flaschen 2014-10-01 03:52:26 UTC
Most of these desktop touchscreens still have/support mice in addition, right?

I think this makes sense.  The only risk is if people perceive it as inconsistent, but as long as it only fires for an actual touch (not a click on a device that happens to support touch), this is not an issue in my opinion.

I think it could continue to listen to hover as well, though.  That means if you're using a touch-screen device with a mouse, hover will still work.

Side note, some touch screen devices support hover for your actual finger.  E.g. on my Galaxy S4 I can hover my finger over the phone dial pad and see my speed dial contacts before touching.  I have no idea if any devices expose this hover event to JavaScript.
Comment 3 Jared Zimmerman (WMF) 2014-10-01 04:06:01 UTC
Sounds like you want to work in this Matt ;)
Comment 4 Matthew Flaschen 2014-10-02 06:05:01 UTC
(In reply to Jared Zimmerman (WMF) from comment #3)
> Sounds like you want to work in this Matt ;)

Okay, given that the actual expand/collapse is in CSS (with :hover), my idea is to either:

1. Use :focus as well (doesn't seem to be working, I think because it's focusing on the <a> element, not the <li>, but may be correctable with tabindex).

2. Use a class to mark when it's opened.

Then the question is which events to use to either focus it or add that class (and then remove).  I'm thinking:

On the element:

touchend - Open (but maybe also close if they touch again when it's already open)
touchleave - Close

Outside the element:

touchend - Close

I haven't done anything with touch events before, so this will take a little iteration.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links