[Bug 27558] Specify MouseEvent.which

https://www.w3.org/Bugs/Public/show_bug.cgi?id=27558

--- Comment #7 from Rick Byers <rbyers@chromium.org> ---
Yeah that was my initial reaction too (i.e. unlike pageX/pageY - which really
does have meaning on more than one type of UIEvent).  However the meaning is
completely different depending on the interface.  It's pretty odd to have API
docs like:

UIEvent.which:
 - on KeyboardEvent this is the key code.  On MouseEvent it's the button
pressed.

Makes a lot more sense to just have separate docs on MouseEvent and
KeyboardEvent (which MDN does have by the way - with the docs for UIEvent.which
being incomplete).

Also I just checked to see if I could find an example of a site accessing
'which' for a non-keyboard non-mouse event.  I immediately found this code in
GMail operating on a FocusEvent ('a'):

        for (c in a)
            b[c] = a[c];

So again (like the discussion here:
https://groups.google.com/a/chromium.org/d/msg/blink-dev/pjohnl9znQQ/eHvq4U6E2skJ)
access is due to an event library attempting to make a copy of the event.

But I agree with Olli that it may not be worth the effort.  Anyone from IE want
to weigh in since they'd be the one that would have to change?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Friday, 10 July 2015 14:03:28 UTC