W3C home > Mailing lists > Public > public-pointer-events@w3.org > October to December 2017

Re: [pointerevents] touch-action doesn't allow for press-hold-drag UX

From: Piotr via GitHub <sysbot+gh@w3.org>
Date: Thu, 05 Oct 2017 10:14:59 +0000
To: public-pointer-events@w3.org
Message-ID: <issue_comment.created-334422338-1507198485-sysbot+gh@w3.org>
I'm facing exactly same problem, as @RByers described:
In the app I'm working on users should be able to move elements inside a scrollable container.

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 `touch-action: none;` property - it has no effect after touchstart.
Two possible workaround I found are: 
- register _touchstart_ event implicitly as non-passive and run _preventDefault_ inside a listener
- change to _overflow: hidden_ for scrollable container (scrollbars disappear and layout changes)

-- 
GitHub Notification of comment by piotr-cz
Please view or discuss this issue at https://github.com/w3c/pointerevents/issues/178#issuecomment-334422338 using your GitHub account
Received on Thursday, 5 October 2017 10:14:48 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 5 October 2017 10:14:49 UTC