New issue
Advanced search Search tips

Issue 796265 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

No dragend event when drag start by touch.

Project Member Reported by eirage@chromium.org, Dec 19 2017

Issue description

On Android, user can drag drag-able item by touch or mouse. However, no dragend event when release.

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. dragend event should be sent when release. 

Actual:
4. no dragend event
 

Comment 1 by eirage@chromium.org, Dec 19 2017

Cc: dtapu...@chromium.org nzolghadr@chromium.org
The reason probably is Android drag api doesn't provide coordinates for ACTION_DRAG_ENDED: https://developer.android.com/reference/android/view/DragEvent.html

I think we can use the last ACTION_DRAG_LOCATION event coordinates to fire dragend event.
Project Member

Comment 2 by bugdroid1@chromium.org, Dec 24 2017

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

commit d37a9f10c7e32ff40e864a2ff30478fc8a0a1169
Author: Ella Ge <eirage@chromium.org>
Date: Sun Dec 24 00:19:47 2017

Android OnDragEnded use last drag update coords

ACTION_DRAG_ENDED doesn't provide coordinates.
So In this CL, we store the last dragUpdate coordiantes and use it in
dragend event.
And when drag not start, we need to call OnSystemDragEnded to clear drag
and drop state in blink.

Bug:  796265 
Change-Id: I3d720a1dff0c478233b8f9762c834f2b0bfa9bc8
Reviewed-on: https://chromium-review.googlesource.com/836810
Commit-Queue: Ella Ge <eirage@chromium.org>
Reviewed-by: Navid Zolghadr <nzolghadr@chromium.org>
Reviewed-by: Ted Choc (OOO til 2018) <tedchoc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526153}
[modify] https://crrev.com/d37a9f10c7e32ff40e864a2ff30478fc8a0a1169/content/browser/web_contents/web_contents_view_android.cc
[modify] https://crrev.com/d37a9f10c7e32ff40e864a2ff30478fc8a0a1169/content/browser/web_contents/web_contents_view_android.h

Comment 3 by eirage@chromium.org, Dec 24 2017

Status: Fixed (was: Assigned)

Sign in to add a comment