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

RE: Mouse Button Event Handling - Improvement Suggestion

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

Hi, Doug,

excellent! This is a really good work. And a great relief to know.

Kind regards,
Axel Dahmen
www.axeldahmen.de




-------------------------------------------------
Hi, Axel-
 
Thanks for your suggestion.
 
We can't change the 'button' attribute [1], because existing content 
relies upon it.  However, we have added a 'buttons' attribute to 
accomplish the use case you describe [1].  Please let us know if this 
satisfies your request.
 
[1] 
http://dev.w3.org//2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-Events-MouseEvent-button
[2] 
http://dev.w3.org//2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-Events-MouseEvent-buttons
 
Regards-
-Doug Schepers
W3C Team Contact, SVG and WebApps WGs
 
Hans Meiser wrote (on 2/8/10 6:12 AM):
> 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 		 	   		  
_________________________________________________________________
Hotmail: Powerful Free email with security by Microsoft.
https://signup.live.com/signup.aspx?id=60969
Received on Monday, 8 February 2010 11:47:57 GMT

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