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

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

From: Rick Byers via GitHub <sysbot+gh@w3.org>
Date: Thu, 01 Jun 2017 18:57:33 +0000
To: public-pointer-events@w3.org
Message-ID: <issue_comment.created-305587277-1496343452-sysbot+gh@w3.org>
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 `touch-action: pan-x pan-y draggable` and `touch-action: pan-y draggable` (eg. in case you have a horizontal image carousel that also supports from drag-and-drop case).

However we'd rather use a term like `unless-long-press` (or eg. `unless-hold`) to be consistent in focusing on the browser actions (not what JS might do with the events) and imply that the listed touch-actions are permitted unless the user first does a long-press.  If the user starts panning, then you get `pointercancel` and no events like normal for `touch-action: auto`.  But if, before panning, the user holds their finger down, then you get this event followed by `pointermoves` as for `touch-action: none`

Open questions
 - Precise touch-action token name - `unless-long-press`, `unless-hold` etc?
 - Presumably the event name will follow the touch-action name, right?  Eg. `pointerlongpress`, `pointerhold`, but do we want to explicitly add the `touch` word to make it clear it applies only to devices where `touch-action` applies?  Eg. `pointertouchhold` seems pretty decent to me.
 - We want this completely separate from higher-level concepts like HTML DnD and `contextmenu` right? I think it's best to think of this as a low-level primitive API.
 - Does cancelling `pointertouchhold` prevent browser native behavior that follows from a hold like the context menu (and associated generation of `contextmenu` event)?  I'd argue it should.

@NavidZ said he'd look into this a little further.

-- 
GitHub Notification of comment by RByers
Please view or discuss this issue at https://github.com/w3c/pointerevents/issues/178#issuecomment-305587277 using your GitHub account
Received on Thursday, 1 June 2017 18:57:39 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 1 June 2017 18:57:41 UTC