W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2013

Re: Firing click from middle/right mouse clicks WAS: Thanks for participating on the DOM3 Events Call

From: Glenn Maynard <glenn@zewt.org>
Date: Thu, 24 Oct 2013 09:12:15 -0500
Message-ID: <CABirCh_xK_=wQkUXc5iRbmEOLfS5yirq9A7NkW5Z8qxxRWgnUg@mail.gmail.com>
To: Daniel Bratell <bratell@opera.com>
Cc: Boris Zbarsky <bzbarsky@mit.edu>, Ojan Vafai <ojan@chromium.org>, "www-dom@w3.org" <www-dom@w3.org>
On Thu, Oct 24, 2013 at 2:27 AM, Daniel Bratell <bratell@opera.com> wrote:

> Gecko does indeed fire a click event in most cases when the user presses
> and releases the middle button of the mouse, but according to the
> documentation in the Bugzilla bug, that was just to keep some internal
> functionality working. It is not a standard event since its target is the
> node you interact with, but it's not dispatched there but at the document
> (where it's unlikely to be seen).
>

It doesn't seem all that unlikely, since you'll see it if you're using
event delegation with your listener on the document or the window.  That's
probably not common (typically event delegation is done on a container for
a set of specific elements, and not the entire document), but it doesn't
seem too far out there.

(I'm naively curious why they didn't fire a different "click" event name
for their internal stuff that needed it on middle click, instead of
introducing yet another bizarre glitch onto the Web.)

-- 
Glenn Maynard
Received on Thursday, 24 October 2013 14:12:43 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:21 UTC