-
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
Enable direct pen and touch to have different touch-action behavior #203
Comments
would we consider this for v2 still? concerned about this (and the 2 implementation requirement) potentially prolonguing the path to TR (which we've not embarked on yet). with that out of the way, this sounds reasonable. it's another "why are we doing this in CSS if it's about behavior?" one, but that boat already sailed with |
Have you considered extending Perhaps something similar to touch-action: "auto", some-other-keyword("none", "pen"); Not sure what would be a good name for |
Nah, not worth delaying v2 for to me. I'd be fine considering it for level 3 (an extension for now).
Yeah my concern with that is just around web compat. That rule will fail to parse in browsers that don't support it, so developers will end up having to specify two rules for at least the next 5 years anyway. I think it makes such compat bugs less likely if we just introduce a new property.
That's a good point. We should totally think about how it would interact with a new/unexpected pointerType. In the drawing app scenario where you've got the pen doing inking but the finger scrolling, if some other direct manipulation pointer device was used (I have no idea what that would be since the esoteric device are all AFAIK indirect manipulation) should that device do inking or scrolling? Another way we could address your concern is with a generic property that has a list of pointer types. Eg: touch-action-pointers: "pen" The default would be |
I think I have different concern though: any of these ideas ( For example, the outcome is not obvious when pen events have pointerMovementScrolls == false but the same events are supposed to Am I the only one to find three levels of parameters (type + capabilities + action) too complicated? Any chance we may not need pointerMovementScrolls at all if we have touch-action-pointers? |
the danger i see here is that |
It's definitely complicated but I think they represent different thing. |
I actually thought about something similar as @scottgonzalez suggested, but kind of in revers:
|
I love the concept of allowing for different This feels like the exact sort of reason @media(pointer-type: touch) {
#carousel {
pointer-action: pan-y
}
}
@media(pointer-type: pen) {
#carousel {
pointer-action: none
}
} |
@patrickkettner I thought about this, but we already have Also problem here is to ably 2 different pointer-actions (one per pen, other per touch) at the same time. I'm not sure how media query would help with that. Do you mean that media query will be automatically applied when one type of a pointer is used? What about 2 at the same time? |
If something, I also feel that |
its solving a completely different problem. you could very much want a different
firmly disagree. even if it did, a more useful interface shouldn't be stopped because a lesser one already exists.
thats not a problem? you can do that today @media (min-width: 500px) {
background: blue
}
@media (width: 500px) {
background: red
} both will apply at 500px wide, and if they interfere with one another source order precedence exists.
yep, just like :hover and :selected pseudo selectors, they apply based on state of the element.
see above |
I didn't mean it solves this problem. I mean that
Sorry, I don't get. Having element background property set to
On the whole document then because @media query are global (unless shadow dom?) to the document (just correction, not that I disagree here). |
I'm just worried about its future.
Sure, I am just saying that that is tangential to this issue
Sorry, I don't get. Having element background property set to red and blue doesn't make it having red and blue at the same time.
That's exactly my point. If someone sets conflicting pointer-action values, we have known ways of handling the conflicts - source order.
On the whole document then because @media query are global (unless shadow dom?) to the document (just correction, not that I disagree here).
The media block activates when the input type is either pointer 0 or an active pointer on the document. the specific pointer-action, like all CSS properties, apply on a per selector basis
… On May 9, 2017, at 4:48 PM, Arthur Stolyar ***@***.***> wrote:
its solving a completely different problem.
I didn't mean it solves this problem. I mean that pointer-type media query could be started used instead of pointer media query and the idea of pointer media query was to abstract types from concrete, like touch. But yes, pointer media query is unrelated to the problem in this issue. I'm just worried about its future.
thats not a problem? you can do that today
Sorry, I don't get. Having element background property set to red and blue doesn't make it having red and blue at the same time. Same with pointer-type. I doubt that someone will be scrolling and drawing at the same time though.
they apply based on state of the element.
On the whole document then because @media query are global (unless shadow dom?) to the document (just correction, not that I disagree here).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
After speaking with Matt Rakow about this more, due to the number of potential edge cases with my proposal, I withdraw my complaints about pen-action. I am fine with it |
Looks like EdgeHTML 16 shipped pen-action. |
Discussed at today's PEWG meeting (https://www.w3.org/2019/07/10-pointerevents-minutes.html) ... there's a desire to look at a more input-agnostic model (or at least a more neutral "naming", so we don't end up with lots of different |
Here's a link to the pen-action explainer that was discussed and resulted in the comment Patrick wrote above. |
Regarding a more generic proposal in response to the WG feedback, @gked and I played with some syntax and arrived at the same proposal by @NekR above. pointer-action: pen(none) touch(pan zoom); We like the future-proofing of this proposal. Here are some additional specifics that I imagined were implied by it: The type should parse correctly for any string that syntactically could be a valid future pointer-type. The property should also parse correctly for any string that syntactically could be a valid future action. For example, The user agent is not obligated to recognize and fulfill any particular action, however it is obligated to limit the actions possible to those that have been explicitly put into the list. For example, If the author wants to ensure no actions are possible (the author always wants to see the events), The |
A possibly simpler option that I don't think has been mentioned yet is to declare which devices are direct manipulation (defined in #350) devices and thus produce direct manipulation (i.e. touch) actions. E.g.
However, I like that the suggestion from @BoCupp-Microsoft also serves to deprecate the use of touch-action and be more fine grained for future actions. |
Today a stylus in Chrome Android behaves as a direct manipulation input device (with the implications on touch-action discussed in #202). This works well in practice except for one special case:
In some situations like note taking applications, you might want the pen to draw by default, while still allowing a finger to scroll. That's not possible to express with
touch-action
today.I propose we address this by defining a new
pen-action
property that is defined to apply ONLY to "direct manipulation pen devices", with (for now) only two possible values:auto
: use the value oftouch-action
. I believe this must be the default for web compat reasons (again see Normatively make touch-action apply for direct-manipulation pen devices #202).none
: disable all pen-based panning (and zooming if it exists), just send events.For implementation (and specification) complexity reasons I'd prefer to avoid adding other properties like
pan-x
etc. I think from a UX perspective you're always going to want the pen to behave either identically to the finger, or to draw.@ChumpChief and @atanassov have told me they're interested in exploring this on Edge.
@NavidZ @mustaqahmed @patrickhlauke WDYT?
The text was updated successfully, but these errors were encountered: