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

Mouse Button Event Handling - Improvement Suggestion

From: Hans Meiser <brille1@hotmail.com>
Date: Mon, 8 Feb 2010 12:12:00 +0100
Message-ID: <SNT130-w60EFA9E894BD2DA9B0DBF4E2510@phx.gbl>
To: <www-dom@w3.org>

I have just read about the differences between IE mouse event handling and W3C mouse event handling.

Although the W3C model ("Document Object Model (DOM) Level 2 Events Specification") appears to be the generally more flexible, there is one point where I believe it should adapt to the Microsoft way:

It's the MouseEvent's "buttonArg" property.

Instead of using "0", "1" and "2" for every mouse button, the W3C MouseEvent definition's "buttonArg" property should have followed a binary flag pattern.

There is almost always a mapping necessary for the programmer to keep track of which mouse buttons are currently pressed. So an onerous index to binary pattern mapping has to be performed each and every time.

Despite the fact that how mouse clicks are reported due to the specification is very flexible (each and every mouse key's click 
count can be examined), it still suffers ease of use on 
mouseover/mousemove/mouseout events.


If it would follow the binary pattern, those events could present a combined value of buttons currently clicked.

This would very much support advanced drag & drop features.

So I'd like to suggest to:

* Update the "buttonArg" property definition to follow a binary pattern

* Update mouseover/mousemove/mouseout events to provide a combined "buttonArg" value having a bit set for every mouse button pressed, enabling the programmer to dissect this value.

Thanks,
Axel Dahmen
www.axeldahmen.de
 		 	   		  
_________________________________________________________________
Your E-mail and More On-the-Go. Get Windows Live Hotmail Free.
https://signup.live.com/signup.aspx?id=60969
Received on Monday, 8 February 2010 11:12:33 GMT

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