-
Notifications
You must be signed in to change notification settings - Fork 33
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
touch-action doesn't allow for press-hold-drag UX #178
Comments
Allowing the touch-action rule to change later would be a fairly involved change in Gecko. Would it be possible to instead add another touch-action value that explicitly designates this as the desired behaviour? e.g. |
@staktrace thanks, yeah I was starting to think in that direction too. It's also pretty hard for developers to reason about when a touch-action change will and will not take effect. I like the idea of |
I don't have a strong feeling either way with respect to firing a new event vs saying it triggers immeditaely after a canceled |
Yeah baking in an assumption that the same gesture triggers Anyway I don't think this is urgent - I'll add links here as a discover people needing to use (non-passive) touch events for such cases instead of pointer events (or passive touch events). It seems like it shouldn't be too hard to define a solution if we collect enough evidence of the importance of the issue. |
Talked about this on the Chrome team with @dtapuska @flackr @NavidZ and @tdresser. We agree that the touch-action keyword should be a flag, eg. so that you can have both However we'd rather use a term like Open questions
@NavidZ said he'd look into this a little further. |
I should add that this seems important for Facebook. They've had to go back to using non-passive touch listeners in order to support their "Like" button where you can still scroll by starting on the button, but if you long-press it you get additional options for your "reaction". That's apparently the only case keeping Facebook from getting non-blocking scrolling, and (given the large amount of scrolling that occurs on Facebook) this makes it pretty urgent for the Chrome team. We might have a touch-event-specific workaround (/cc @dtapuska) but it would still be a shame if such scenarios required touch events because they were entirely impossible with pointer events. /cc @bgirard |
#216 suggests what seems like both a simpler and more powerful solution this class of "dwell gesture" problems. Please weigh in there. |
One potential advantage to sticking with |
I'm facing exactly same problem, as @RByers described: As soon as touchstart fires, container should lock it's position so user is able to drag elements, without panning around. It's not possible to achieve by adding the
|
I have a similar issue when trying to implement a custom horizontal pan gesture. I have a |
@dmitryshimkin: Does your custom behavior involve a press-and-hold gesture? If not, please file a new issue to keep this issue focused on press-hold-drag. And please also elaborate why |
Mentioned briefly during today's PEWG call - will review this for next meeting, but personally get the feeling that this may not make it properly into v3. addition of a new |
@NavidZ @liviutinta @smaug---- are we ok to close this, do you think? |
I agree that this is a real problem and needs a solution. But as you suggested in needs more experimentation and incubation first. So if we keep in more like in the backlog might be better than just closing it. |
Are there any updates on this? I'm running into a similar issue where the user touches down on an element and then moves to a neighboring element while still touching. The |
Hi @skedwards88, for that I think you just need to |
I'm wondering what press-hold-and-drag behaviours couldn't be built using HTML5 DnD primitives. I.e. if you set an empty dragImage and listen to drag events it might be possible to build completely custom rich drag interfaces which rely on the native platform timing for when to start drag (just as you would with contextmenu). |
I'd love to know too. Want to whip up some demos? Last time I played with the DnD API and touch (many years ago) I struggled with various edge cases in the DnD behaviour and differences between browsers. But maybe I just didn't try hard enough or maybe it's better now? |
Thank you for the suggestion to use |
In some mobile UX the user can scroll by swiping and also hold their finger for awhile to "pick up" an item which they can then drag around. Since you can't change
touch-action
after thepointerdown
(but before the finger has moved enough to actually scroll), this sort of UX can't be built with pointer events.I suppose one answer is that such UX should just be built using HTML5 DnD primitives, and I am a little ashamed that this works on Edge but not Chrome ;-). But I think there's still an argument for allowing sites to build their own "press-hold-drag" behavior.
I wonder if we could relax the touch-action rules such that the page could still change the value right up until the action has actually started?
@jacobrossi @teddink did you ever run into any complaints about this?
/cc @staktrace @dtapuska
The text was updated successfully, but these errors were encountered: