New issue
Advanced search Search tips

Issue 708278 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Long press gesture causing drag but no touchcancel

Project Member Reported by nzolghadr@chromium.org, Apr 4 2017

Issue description

When long pressing on a drag-able item user can start dragging with touch on Chrome.
However, when the drag starts there is no touchcancel event. Neither there will be any touchend event when drag finishes.

Steps to reproduce:
1. Go to http://jsbin.com/rocilux/edit?html,output
2. Long press with touch on the input box.
3. Start moving around and then release.
4. Observe the events

Expected:
4. Etiher touchcancel or touchend should be sent after touchstart event when drag starts.

Actual:
4. Page only sees a touchstart and a dragstart and no more touch events.
 
Description: Show this description
Cc: rbyers@chromium.org
Rick, is this reasonable to send a touchcancel after drag starts? Note that even dragstart event may be fired drag may not start as js can preventDefault. So I believe we should send touchcancel (and pointercancel) if drag actually starts.
Maybe it is worth mentioning other browsers here as well. Neither of Edge, Safari, or Firefox triggers the drag with long press gesture.

Comment 4 by rbyers@chromium.org, May 12 2017

I agree we should either be sending touchcancel at the start of the drag, or sending touchend when the finger is lifted.  And in either design, we'd presumably send pointercancel when the drag starts (since a "browser action" is taking over).

I was pretty sure Edge had touch drag-and-drop support available somehow, does that really not work anymore?

Comment 5 by rbyers@chromium.org, May 12 2017

BTW I thought only CrOS had touch DnD enabled (see issue 156390 and issue 304894), but I can reproduce the above on Chrome 58 Android.

Comment 6 by eirage@chromium.org, Feb 27 2018

Owner: eirage@chromium.org
Project Member

Comment 7 by bugdroid1@chromium.org, Feb 28 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/34552fa720bd55ae7b87cdb4897477a8a4893e79

commit 34552fa720bd55ae7b87cdb4897477a8a4893e79
Author: Ella Ge <eirage@chromium.org>
Date: Wed Feb 28 19:13:39 2018

Do not suppress pointercancel event when dnd

When long press on a draggable item to start dragging with touch,
we should receive a touchcancel event.
This CL changes it to not suppress pointercancel event when doing
drag and drop.

Bug:  708278 
Change-Id: I754cf86dfce37f33164b797edb1f8a05acb82c9b
Reviewed-on: https://chromium-review.googlesource.com/939649
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Navid Zolghadr <nzolghadr@chromium.org>
Commit-Queue: Ella Ge <eirage@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539917}
[modify] https://crrev.com/34552fa720bd55ae7b87cdb4897477a8a4893e79/third_party/WebKit/Source/core/exported/WebViewImpl.cpp
[modify] https://crrev.com/34552fa720bd55ae7b87cdb4897477a8a4893e79/third_party/WebKit/Source/core/exported/WebViewTest.cpp
[add] https://crrev.com/34552fa720bd55ae7b87cdb4897477a8a4893e79/third_party/WebKit/Source/core/testing/data/long_press_draggable_div.html

Status: Fixed (was: Available)

Sign in to add a comment