[Bug 23240] Normatively specify that right/middle mouse button presses do not cause click/dblclick events

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

Glenn Maynard <glenn@zewt.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |glenn@zewt.org

--- Comment #2 from Glenn Maynard <glenn@zewt.org> ---
> The problem with Blink/WebKit's approach is that sites do something on click which doesn't make sense to do if the user clicks the link with the middle mouse button which should open the link in a new tab. Both actions happen which is not what the user expects.

The developer needs to check if e.button == 0.  Developers already need to do
this, or they'll misbehave when the user right clicks.

Click events should only have fired for left clicks in the first place (failing
to check .button is one of the most common scripting bugs I've seen--even
YouTube screws this up, right in the search results), but it doesn't make much
sense for right click to fire clicks but not middle click.


(In reply to Gary Kacmarcik from comment #1)
> Proposed change to:
> 
> "The click event type must be dispatched on the topmost event target
> indicated by the pointer, when the user presses down and releases the
> *primary* pointer button (i.e., when MouseEvent.button = 0), or otherwise
> activates the pointer in a manner that simulates such an action."

Browsers have fired click for right-click for a long time.  If it was
web-compatible to simply stop doing that, I think browsers would have made that
change years ago.

Given the weird behaviors of browsers here, there are probably a bunch of
strange web-compat things going on.  I don't think it makes sense to try to
spec this until it's known what those are.

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

Received on Friday, 13 September 2013 19:14:28 UTC