Re: MouseEvent button attribute

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 UTC