-
Notifications
You must be signed in to change notification settings - Fork 34
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
Clarify the button value for mouse drag #34
Conversation
@jacobrossi, please let me know if my proposed changes make the spec clearer or not. |
@@ -319,26 +319,46 @@ | |||
<section> | |||
<h3><dfn>Chorded Button Interactions</dfn></h3> | |||
<div><p>Some pointer devices, such as mouse or pen, support multiple buttons. In the [[!DOM-LEVEL-3-EVENTS]] Mouse Event model, each button press produces a <code>mousedown</code> and <code>mouseup</code> event. To better abstract this hardware difference and simplify cross-device input authoring, Pointer Events do not fire overlapping <code>pointerdown</code> and <code>pointerup</code> events for <a data-lt="Chorded Button Interactions">chorded button presses</a> (depressing an additional button while another button on the pointer device is already depressed).</p> | |||
<p>Instead, chorded button presses can be detected by inspecting changes to the <code>button</code> and <code>buttons</code> properties. The <code>button</code> and <code>buttons</code> properties are inherited from the [[!DOM-LEVEL-3-EVENTS]] <code>MouseEvent</code> interface. In order to facilitate differentiating button state transitions in any pointer event (and not just <code>pointerdown</code> and <code>pointerup</code>), the <code>button</code> property takes on a new value when no mouse buttons are depressed:</p> | |||
<p>Instead, chorded button presses can be detected by inspecting changes to the <code>button</code> and <code>buttons</code> properties. The <code>button</code> and <code>buttons</code> properties are inherited from the [[!DOM-LEVEL-3-EVENTS]] <code>MouseEvent</code> interface with modified semantics and values; see the following sections for details.</p></div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest a subtle rewording from
interface with modified semantics and values; see the following sections for details.
to
interface, but with a change in semantics and values, as outlined in this section.
...with apologies for possibly bikeshedding some wording there. Apart from that, I think it brings the point we're trying to make across. Would it also be possible to squash this before committing, once we settled on final wordings? |
1705d72
to
191b8f7
Compare
Hi Patrick: |
</section> | ||
</section> | ||
<section> | ||
<h2><dfn>The Primary Pointer</dfn></h2> | ||
<div><p>In a multi-pointer (e.g. multi-touch) scenario, the <a href="#widl-PointerEvent-isPrimary"><code>isPrimary</code></a> property is used to identify a master pointer amongst the set of active pointers for each pointer type. Only a primary pointer will produce <a>compatibility mouse events</a>. Authors who desire single-pointer interaction can achieve this by ignoring non-primary pointers (however, see the note below on <a href="#multiple-primary-pointers">multiple primary pointers</a>). | ||
<div><p>In a multi-pointer (e.g. multi-touch) scenario, the <a href="#widl-PointerEvent-isPrimary"><code>isPrimary</code></a> property is used to identify a master pointer amongst the set of active pointers for each pointer type. Only a primary pointer will produce <a>compatibility mouse events</a>. Authors who desire single-pointer interaction can achieve this by ignoring non-primary pointers (however, see the note below on <a href="#multiple-primary-pointers">multiple primary pointers</a>)</p></div>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stray "." after the closing </div>
at the end
LGTM (noting that one tiny stray ".") |
Thanks for the review @patrickhlauke. I finally made time to take a look and it looks great to me (except for that trailing "." - otherwise I'd merge). I'm out for a week and a half, Patrick can you please merge this once that last issue is fixed? |
191b8f7
to
b51a0f6
Compare
Done moving the '.' to the para before. |
b51a0f6
to
3dc4151
Compare
Fixed the second '.' outside the para, yikes! Sorry for the oversight! |
Lovely, thank you 👍 |
Clarify the button value for mouse drag, and how it differs from mouse events/dom level 3
The current spec wording suggests that the |button| value indicates "the last button changed" (like MouseEvent). On the other hand, the current Edge behavior suggests that |button| is "the button change that triggered the current event". The latter makes more sense since it makes it easier to differentiate between
This patch proposes a spec wording change based on the Edge behavior.
Issue #33