- From: Rick Byers <rbyers@chromium.org>
- Date: Wed, 22 Oct 2014 22:03:31 -0400
- To: Sebastien Pereira2 <SPEREIRA@fr.ibm.com>
- Cc: "public-touchevents@w3.org" <public-touchevents@w3.org>, "public-pointer-events@w3.org" <public-pointer-events@w3.org>
- Message-ID: <CAFUtAY84ajyqbZgHvbfBxiANC5DHxR2qpp+VGuDUdZA+0fpceQ@mail.gmail.com>
Just realized (when reviewing the archive) that I missed this thread - sorry! Since this question is really about touch-action, public-pointerevents is the right place for it. Unfortunately it's not as simple as allowing touch-action to be changed for an in-progress gesture. Touch-action is designed to allow scrolling to start independently from anything going on in JS, so technically there would be a race (perhaps you don't actually get a chance to run your JS before the user starts dragging their finger, and then scrolling would happen when it wasn't supposed to). Personally I think this is an example scenario where you really want to be able to customize the browser's scrolling logic somehow, and yes scroll-delay is one (contentious) idea I have for how to enable that. But others in this group will probably disagree and say we should focus on ensuring browsers have the specific feature you really need. Eg. what about using HTML5 drag and drop APIs instead of trying to built it yourself? In IE at least (and in Chrome on some platforms) HTML5 DnD can be triggered with touch via the long press gesture. Rick On Mon, Sep 8, 2014 at 9:55 AM, Sebastien Pereira2 <SPEREIRA@fr.ibm.com> wrote: > When we wanted to add the ability to drag and drop Items from a scrollable > list [1] using native Pointer Events when available or synthetic events > [2], but we faced to this limitation: > > Let's take a scrollable list where "touch-action:auto" and "overflow: > auto" are enforced to take advantage of native scroll. > > When the user touches the screen and makes a long press, we want the > application takes control in order to: > - disable the scroll for the current pointer, > - allow the user to drag the list item that is beneath its finger to move > it to another place in the list. > > Of course we can dynamically change the value of "touch-action", but the > issue is that the new value of touch-action is applied only for subsequent > pointer/touch Ids. > > For now, we manage to implement this feature only with Touch Events > without relying on the touch-action CSS property (so we can control when we > call preventDefault on touchmove). > > I don't know how/if this could be solved by the "scroll-delay" CSS > property, but the first thing we thought is that it would be great if > changing the value of "touch-action" on an element could change the > behavior of the current pointer. Does that seem feasible? Is this something > that could be considered ? > > [1] https://github.com/ibm-js/deliteful/issues/232 > [2] https://github.com/ibm-js/dpointer > > Sebastien Pereira > IBM JS Team > http://ibm-js.github.io/blog > https://github.com/dojo > --- > 33-1-5875-3479 (803479) > Sauf indication contraire ci-dessus:/ Unless stated otherwise above: > Compagnie IBM France > Siège Social : 17 avenue de l'Europe, 92275 Bois-Colombes Cedex > RCS Nanterre 552 118 465 > Forme Sociale : S.A.S. > Capital Social : 655.732.332,20 € > SIREN/SIRET : 552 118 465 03644 - Code NAF 6202A
Received on Thursday, 23 October 2014 02:04:18 UTC