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

Add hasPointerCapture #127

Merged
merged 4 commits into from Aug 2, 2016

Conversation

@RByers
Copy link
Contributor

commented Aug 1, 2016

Fixes #121

Also cleans up a couple related definitions for easier linking.

@RByers

This comment has been minimized.

Copy link
Contributor Author

commented Aug 1, 2016

index.html Outdated
@@ -1002,6 +1006,7 @@
<li><a href="https://github.com/w3c/pointerevents/pull/34">Clarify the button value for mouse drag</a></li>
<li><a href="https://github.com/w3c/pointerevents/pull/24">Fix the touch-action processing model for zoom scenarios</a></li>
<li><a href="https://github.com/w3c/pointerevents/pull/13">Add direction-specific touch-action values</a> (pan-left, pan-right, pan-up, pan-down) and clarified behavior of existing pan-x and pan-y values.</li>
<li><a href="https://github.com/w3c/pointerevents/pull/127">Add hasPointerCapture</a></li>

This comment has been minimized.

Copy link
@patrickhlauke

patrickhlauke Aug 1, 2016

Member

the revision history is in reverse chronological order, so this should be at the very top of the list

This comment has been minimized.

Copy link
@RByers

RByers Aug 2, 2016

Author Contributor

Whoops, thanks.

index.html Outdated
@@ -549,33 +549,33 @@
<p>For all PointerEvents in the table above, <a href="https://www.w3.org/TR/uievents/#widl-UIEvent-detail">detail</a> attribute defined in [[!DOM-LEVEL-3-EVENTS]] SHOULD be 0.</p>

<section>
<h3><dfn>The <code>pointerover</code> event</dfn></h3>
<h3>The <dfn><code>pointerover</code> event</dfn></h3>

This comment has been minimized.

Copy link
@patrickhlauke

patrickhlauke Aug 1, 2016

Member

nit: if it's not too much trouble, possible to split out these fixes to <dfn> into a separate standalone PR or commit?

This comment has been minimized.

Copy link
@RByers

RByers Aug 2, 2016

Author Contributor

Done in #128

@patrickhlauke

This comment has been minimized.

Copy link
Member

commented Aug 1, 2016

makes sense to me in principle. random pondering: would we also want a function that lets me query which pointer(s) the element i'm calling the function on has capture for? or is that getting a bit too convoluted?

index.html Outdated
<dt><dfn>hasPointerCapture</dfn></dt>
<dd>
<p>Indicates whether the element on which this method is invoked has <a>pointer capture</a> for the pointer identified by the argument <code>pointerId</code>. In particular, returns <code>true</code> if the <a>pending pointer capture target override</a> for <code>pointerId</code> is set to the element on which this method is invoked, and <code>false</code> otherwise.</p>
<div class="note">This method will return true immediately after a call to <a>setPointerCapture</a>, even though that element will not yet have received a <a>gotpointercapture event</a>. As a result it can be useful to detecting <a>implicit pointer capture</a> from inside of a <a>pointerdown event</a> listener.</div>

This comment has been minimized.

Copy link
@scottgonzalez

scottgonzalez Aug 2, 2016

Member

"useful to detecting" -> "useful for detecting" or "useful to detect"

This comment has been minimized.

Copy link
@RByers

RByers Aug 2, 2016

Author Contributor

Done, thanks.

@scottgonzalez

This comment has been minimized.

Copy link
Member

commented Aug 2, 2016

makes sense to me in principle. random pondering: would we also want a function that lets me query which pointer(s) the element i'm calling the function on has capture for? or is that getting a bit too convoluted?

Do you have a scenario in mind where you would want to know this? We expect this would be used inside an event and you'd be querying against the single pointer ID for that event.

@patrickhlauke

This comment has been minimized.

Copy link
Member

commented Aug 2, 2016

Do you have a scenario in mind

admittedly no, i don't have a concrete use case in mind - which is probably a good indicator that this would be superfluous.

@RByers

This comment has been minimized.

Copy link
Contributor Author

commented Aug 2, 2016

Do you have a scenario in mind

admittedly no, i don't have a concrete use case in mind - which is probably a good indicator that this would be superfluous.

Yeah I think the use cases even for this simple API are pretty limited. I think we should add it mainly as a hedge - it makes conceptual sense, has nice symmetry with the existing APIs and so adds very little overall complexity, and there's some reason to believe there may be non-zero value. But for anything more complex I think we should wait for more compelling use cases. Easy to add later though!

@RByers RByers force-pushed the RByers:hasPointerCapture branch from a43f90a to 61a87d8 Aug 2, 2016

@RByers

This comment has been minimized.

Copy link
Contributor Author

commented Aug 2, 2016

Suggestions applied, any other feedback?

@patrickhlauke

This comment has been minimized.

Copy link
Member

commented Aug 2, 2016

Looking good to me, fella

@RByers

This comment has been minimized.

Copy link
Contributor Author

commented Aug 2, 2016

Ok, thanks! Let's land this now then (so I can more easily do the next step) - happy to take additional feedback after the fact.

@RByers RByers merged commit 8de360d into w3c:gh-pages Aug 2, 2016

@RByers RByers deleted the RByers:hasPointerCapture branch Aug 29, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.