Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Value of button in a chorded pointerdown event #4

Closed
AFBarstow opened this issue Apr 10, 2015 · 6 comments
Closed

Value of button in a chorded pointerdown event #4

AFBarstow opened this issue Apr 10, 2015 · 6 comments
Assignees

Comments

@AFBarstow
Copy link
Contributor

This Issue captures the following email from Stuart P. Bentley stuart@testtrack4.com on 16 Mar 2015

[[
https://lists.w3.org/Archives/Public/public-pointer-events/2015JanMar/0029.html

It's not clear in the 24 February 2015 draft - what is the value of
button supposed to be when multiple buttons are pressed in a
pointerdown (or pointerup) event (as the current spec says only one
event will be generated)?

(It's also not particularly clear in the draft that the buttons values
are supposed to be a bitmask, which is only mentioned in the Mouse
Events spec.)
]]

@NekR
Copy link

NekR commented Apr 10, 2015

The button and buttons properties are inherited from the [DOM-LEVEL-3-EVENTS] MouseEvent interface

I believe this means what buttons are bitmask since behavior of buttons is not overridden by PE spec, but only button behavior.

Does some one think it should be explicitly redefined? Are there case in other specs when some interface inherits from another in remote spec and then redefines unchanged-inherited properties at new interface?

@RByers
Copy link
Contributor

RByers commented Apr 20, 2015

I know there was some debate over whether it was OK to a add new (negative) value to button, I'll try to dig up the references.

As for what should happen, it looks like IE updates 'button' to indicate the most recent button change (eg. on chorded button press, there's a pointermove event with button representing the new button being pressed).

The MouseEvent spec says: "Note: The value of button is not updated for events not caused by the depression/release of a mouse button."

I don't have a strong opinion - I think speccing IE's existing behavior is probably fine.

@RByers
Copy link
Contributor

RByers commented Apr 20, 2015

Note I think there is no such thing as a "chorded pointerdown". One button is always considered to have been pressed before another (with order being irrelevant since it's indistinguishable from arbitrarily-fast hardware).

I think the only real question here is how 'button' behaves on the pointermove events that occur while multiple buttons are down.

@patrickhlauke
Copy link
Member

Do #33 and #34 resolve this?

@patrickhlauke
Copy link
Member

@mustaqahmed
Copy link
Member

Section 5.1.1.2 and Section 5.1.1.3 (added through #34) fixes the main problem in this issue. We still don't explicitly mentioning that buttons is a bitmask. I think it would clarify the term "current state" in Section 5.1.1.3. I will create a PR now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants