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

Re: [DOM3Events] Pointer Events request to change DOM 3 Events "button" type

From: Jacob Rossi <Jacob.Rossi@microsoft.com>
Date: Mon, 21 Jan 2013 23:09:54 +0000
To: Bjoern Hoehrmann <derhoermi@gmx.net>, Travis Leithead <travis.leithead@microsoft.com>, Anne van Kesteren <annevk@annevk.nl>, "www-dom@w3.org" <www-dom@w3.org>, "olli@pettay.fi" <olli@pettay.fi>
Message-ID: <336a2c3fc64c48189f5797e2fb8feddc@BN1PR03MB021.namprd03.prod.outlook.com>
From: Bjoern Hoehrmann <derhoermi@gmx.net>
>* Travis Leithead wrote:
>>Nothing else in the DOM Level 3 Events spec would change (except perhaps 
>>some clarifying statements that mouse events only ever return values of 
>>0 or greater for the button attribute.
>
> http://www.w3.org/TR/2013/WD-pointerevents-20130115/ proposes "In order
> to facilitate differentiating button state transitions in any pointer
> event (and not just pointerdown and pointerup), the button property
> takes on a new value when no mouse buttons are depressed" specifically
> the value -1 would be for "Mouse move with no buttons pressed". So, for
> 'mousemove' with no button pressed you will get MouseEvent.button == 0,
> while for "pointer events" you get MouseEvent.button == -1?

Trusted mouse* events will not change (preserving compat).  So for a mousemove, you'll get 0. But for pointermove you would get -1. I added a quick note to the pointer events spec to clarify this: https://dvcs.w3.org/hg/pointerevents/raw-file/tip/pointerEvents.html#chorded-button-interactions

But because the PointerEvent interface inherits from MouseEvent, the property needs to be defined as unsigned to allow the pointermove case.

From: Anne van Kesteren <annevk@annevk.nl>
> Easiest I think would be to just fix it in the UI Events specification
> and make the world refer to that and either forgot about DOM3 Events
> or publish it quickly for the patent police.

Should be a pretty inconsequential change for DOM L3 Events. Adding Olli because he indicated he preferred DOM L3 Events.

-Jacob
Received on Monday, 21 January 2013 23:13:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 21 January 2013 23:13:13 GMT