W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2001

Re: MouseEvent button attribute

From: Johnny Stenback <jst@netscape.com>
Date: Sun, 04 Feb 2001 01:28:21 -0800
Message-ID: <3A7D20B5.7010802@netscape.com>
To: Jeff Yates <pbwiz@hotmail.com>
CC: www-dom@w3.org
Jeff Yates wrote:

> I have been programing in JavaScript in Mozilla, and I have noticed 
> that they do not apply the button attribute in the MouseEvent they way 
> you recommend (DOM: 0=left, 1=middle, 2=right  Moz:1=left, 2=middle, 
> 3=right).  Has the W3C DOM recomendation been updated, or has Mozilla 
> just improperly applied it?
> 

This is a bug in mozilla, see 
http://bugzilla.mozilla.org/show_bug.cgi?id=60703 (you can add yourself 
to the cc list of the bug if you wanto track the progress on the bug).

>  
> 
> I would also recommend adding buttonLeft, buttonRight and buttonMiddle 
> properties to show when multiple buttons are being pressed, and keep 
> the button property to show which one is being pressed for this event 
> (pressed last).  Here is an example of why it is important to know:  
> Right click on the document and hold.  Drag the mouse out of the 
> browser window.  Bring the mouse back into the window and left click 
> on the document.  If you were trying to capture a left AND right click 
> by keeping track of the mousedown and mouseup events then this method 
> would fail (mouseup does not happen when it is release outside of the 
> browser).
> 
>  
> 
> Thank you.
> 
>  
> 
> Jeff.
> 

-- 
jst
Received on Sunday, 4 February 2001 04:26:41 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:48 GMT