- From: Doug Schepers <schepers@w3.org>
- Date: Mon, 08 Feb 2010 06:31:20 -0500
- To: Hans Meiser <brille1@hotmail.com>
- CC: www-dom@w3.org
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
Received on Monday, 8 February 2010 11:31:23 UTC