Skip to content
New issue

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

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

Already on GitHub? # to your account

Normatively make touch-action apply for direct-manipulation pen devices #202

Closed
RByers opened this issue May 5, 2017 · 4 comments · Fixed by #350
Closed

Normatively make touch-action apply for direct-manipulation pen devices #202

RByers opened this issue May 5, 2017 · 4 comments · Fixed by #350
Assignees
Labels

Comments

@RByers
Copy link
Contributor

RByers commented May 5, 2017

We have this note at the top of section 9:

While the issue of pointers used to manipulate the viewport is generally limited to touch input (where a user's finger can both interact with content and pan/zoom the page), certain user agents may also allow the same types of (direct or indirect) manipulation for other pointer types. For instance, on mobile/tablet devices, users may also be able to pan using a stylus. This section applies to these scenarios as well (despite the specification's use of "touch").

We discussed the PR a bit on Twitter. I think there should be normative text that REQUIRES that touch-action apply to a device if and only if InputDeviceCapabilities.pointerMovementScrolls is true.

In particular, I think doing anything else would cause a web compat and interop problem. Eg. if we decided to change ChromeOS so that pen dragging scrolled but DIDN'T honor touch-action, then tons of sites like Google Maps would be broken when you drag with pen (since you'd get a pointercancel).

The simplest way to do that is to probably refactor the text at the top of 10.3 into a section that defines the term "direct manipulation pointing device", and then reference that term from both the touch-action and implicit capture sections.

@patrickhlauke @mustaqahmed @NavidZ WDYT?

@patrickhlauke
Copy link
Member

i was going to ask "can we require something in this spec when a property of a WICG proposed spec thing is true?" but I see 10.3 already references that WICG spec...so i guess that's kosher?

by refactoring i assume you mean moving the "direct manipulation pointing device" bit into the glossary https://w3c.github.io/pointerevents/#glossary and then reworking both 10.3 and the top of section 9 accordingly? if so, happy to give it a shot...

@patrickhlauke patrickhlauke self-assigned this May 5, 2017
@patrickhlauke
Copy link
Member

oblique question: if you had a device where you use a mouse to move a visible pointer on screen, and then clicking-and-dragging also resulted in scrolling...would you call that a direct manipulation pointing device" too? that's the scenario i was thinking about when i added the "(direct or indirect)" bit (and as an example: Chrome on desktop with DevTools in mobile emulation mode)

@RByers
Copy link
Contributor Author

RByers commented May 5, 2017

so i guess that's kosher?

I don't see why not. REC specs can reference ED specs if necessary, right? It probably needs to be clear what the behavior is supposed to be when that API isn't supported (as I think it is in this case).

by refactoring i assume you mean moving the "direct manipulation pointing device" bit into the glossary https://w3c.github.io/pointerevents/#glossary and then reworking both 10.3 and the top of section 9 accordingly? if so, happy to give it a shot...

The glossary is non-normative to help readers understand the meaning of terms. Is that good enough here? Or do we need some normative section like one that's defining an algorithm? Personally it doesn't really make a difference to me - as long as (as a group) we'd be OK having a test for this (though I'm not sure if this change itself necessarily warrants a new test).

@NavidZ I guess we don't have a way currently to test the difference between a "touch-like pen" and "mouse-like pen" in our automation API, right? Perhaps we should?

@RByers
Copy link
Contributor Author

RByers commented May 5, 2017

oblique question: if you had a device where you use a mouse to move a visible pointer on screen, and then clicking-and-dragging also resulted in scrolling...would you call that a direct manipulation pointing device" too? that's the scenario i was thinking about when i added the "(direct or indirect)" bit (and as an example: Chrome on desktop with DevTools in mobile emulation mode)

Right, good question. I think we'd want to treat such a device exactly as we're saying direct devices should be treated, but I see the argument that it's potentially confusing to call it "direct" (so I think what we're debating here is just terminology, not behavior). The devtools case is maybe misleading because it's definitely aiming to emulate a touch as closely as possible, so from a spec/platform perspective we should think of that exactly like a touch. But maybe a Wii remote or something that has grab-to-scroll behavior.

The essential property IMHO is the "pointer movement scrolls" bit. I'm happy to use a better term for devices that have that property if anyone can think of one that's better than "direct manipulation".

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

Successfully merging a pull request may close this issue.

3 participants