Re: Issue 39399 in chromium: dataTransfer.dropEffect not properly set on dragEnter, dragOver, drop, dragEnd

726 views
Skip to first unread message

chro...@googlecode.com

unread,
Apr 2, 2010, 6:14:13 AM4/2/10
to chromi...@chromium.org

Comment #6 on issue 39399 by dch...@chromium.org: dataTransfer.dropEffect
not properly set on dragEnter, dragOver, drop, dragEnd
http://code.google.com/p/chromium/issues/detail?id=39399

I've filed https://bugs.webkit.org/show_bug.cgi?id=37012 for dragenter /
dragover.

Fixing drop / dragend will require some Chrome plumbing changes though.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

chro...@googlecode.com

unread,
Apr 2, 2010, 11:59:01 PM4/2/10
to chromi...@chromium.org
Updates:
Cc: jia...@chromium.org

Comment #7 on issue 39399 by dch...@chromium.org: dataTransfer.dropEffect

not properly set on dragEnter, dragOver, drop, dragEnd
http://code.google.com/p/chromium/issues/detail?id=39399

I gave a bit more thought about fixing drop/dragend.

Chromium.org has this to say about IPC:
"Synchronous browser-to-renderer IPC is disallowed to prevent blocking the
user-
interface on a potentially flaky renderer."

But by definition, doesn't that make it impossible for drag and drop to
conform to
the spec? We dispatch an IPC drop to the renderer. The event could be
cancelled, in
which case the drop succeeded. The drop event handler can set whatever it
wants as
the dropEffect, but the drag source (browser or not) will never know. Right
now, we
lie and claim that the drag never happened.

dragend is easy enough to fix, but it will be imperfect for DOM -> DOM
dragging
unless we fix the drop event. Am I missing something obvious here?

chro...@googlecode.com

unread,
Apr 5, 2010, 4:34:28 AM4/5/10
to chromi...@chromium.org

Comment #8 on issue 39399 by tony.chromium: dataTransfer.dropEffect not
properly set on dragEnter, dragOver, drop, dragEnd
http://code.google.com/p/chromium/issues/detail?id=39399

Yes, I think it's impossible for us to send the right value back to the
browser process on a drop event. What are
the consequences of not being able to do this? I know of issue 38989, but
are there others?

chro...@googlecode.com

unread,
Apr 8, 2010, 1:12:37 AM4/8/10
to chromi...@chromium.org

Comment #12 on issue 39399 by bugd...@chromium.org:
dataTransfer.dropEffect not properly set on dragEnter, dragOver, drop,
dragEnd
http://code.google.com/p/chromium/issues/detail?id=39399

The following revision refers to this bug:
http://src.chromium.org/viewvc/chrome?view=rev&revision=43925

------------------------------------------------------------------------
r43925 | dch...@chromium.org | 2010-04-07 22:09:49 -0700 (Wed, 07 Apr 2010)
| 8 lines
Changed paths:
M
http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/tab_contents/web_drag_utils_win.cc?r1=43925&r2=43924
M
http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/tab_contents/web_drag_utils_win.h?r1=43925&r2=43924
M
http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/tab_contents/web_drop_target_win.cc?r1=43925&r2=43924
M
http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/views/tab_contents/tab_contents_drag_win.cc?r1=43925&r2=43924

Return an approximately correct drop effect from WebDragTarget::OnDrop.

This isn't actually guaranteed to be correct, since it's the cached value
from previous dragenter / dragover results, but hopefully it's somewhat
correct part of the time. To prevent potential data loss, all moves are
mapped to copies. A future improvement might to fire a
ViewHostMsg_UpdateDragCursor after the renderer processes the drop event.

BUG=39399
TEST=Manual testing using the attached test case on the bug.

Review URL: http://codereview.chromium.org/1572027
------------------------------------------------------------------------

chro...@googlecode.com

unread,
Jun 28, 2010, 8:45:13 PM6/28/10
to chromi...@chromium.org
Updates:
Labels: -Mstone-6 Mstone-X

Comment #14 on issue 39399 by dch...@google.com: dataTransfer.dropEffect

not properly set on dragEnter, dragOver, drop, dragEnd
http://code.google.com/p/chromium/issues/detail?id=39399

Fixing dragenter / dragover / drop requires pinging WHATWG on what the
correct behavior ought to be. The spec might be right, but it'd be good to
confirm, since the currently specced behavior differs from every known
browser. It's not high-priority at the moment since most authors explicitly
set the dropEffect themselves in the event handlers.

chro...@googlecode.com

unread,
Jun 28, 2010, 9:34:34 PM6/28/10
to chromi...@chromium.org

Comment #15 on issue 39399 by a...@chromium.org: dataTransfer.dropEffect not
properly set on dragEnter, dragOver, drop, dragEnd
http://code.google.com/p/chromium/issues/detail?id=39399

I'm confused what the problem is? If dropEffect is set then dropEffect in
dragend should return the same value so that the source can do the correct
thing.

chro...@googlecode.com

unread,
Jun 28, 2010, 10:06:29 PM6/28/10
to chromi...@chromium.org

Comment #16 on issue 39399 by dch...@google.com: dataTransfer.dropEffect
not properly set on dragEnter, dragOver, drop, dragEnd
http://code.google.com/p/chromium/issues/detail?id=39399

There's two separate issues in this bug now.
1. Per the spec, dragenter / dragover / drop should have dropEffect
initialized to certain values depending on the value of effectAllowed. This
is what's up for debate, since the mapping of defaults (see
http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#dropEffect-initialization)
does not corresponding to any known browser.

2. dragend should have the proper dropEffect value. This is only partially
fixed by my patches, but it's better than what we had before. The reason a
full fix is hard is being completely accurate when dispatching dragEnd
events would force the drop handlers in the browser to wait for the
renderer IPC to complete. Since this is commented as something we
explicitly don't want to do, I'm not sure how we can fix it (see the
comment on line 136 in
http://src.chromium.org/cgi-bin/gitweb.cgi?p=chromium.git;a=blob;f=chrome/browser/tab_contents/web_drop_target_win.cc;hb=HEAD).

chro...@googlecode.com

unread,
Sep 13, 2011, 7:42:27 AM9/13/11
to chromi...@chromium.org

Comment #17 on issue 39399 by db...@chromium.org: dataTransfer.dropEffect
not properly set on dragEnter, dragOver, drop, dragEnd
http://code.google.com/p/chromium/issues/detail?id=39399

Issue 96395 has been merged into this issue.

chro...@googlecode.com

unread,
Sep 13, 2011, 8:47:43 AM9/13/11
to chromi...@chromium.org

Comment #18 on issue 39399 by db...@chromium.org: dataTransfer.dropEffect
not properly set on dragEnter, dragOver, drop, dragEnd
http://code.google.com/p/chromium/issues/detail?id=39399

Yup, this bug is definitely still there on Windows. I'll leave it up to
dcheng to decide whether he want to flip to just OS-Windows or not (for
now).

chro...@googlecode.com

unread,
Aug 18, 2012, 12:35:03 PM8/18/12
to chromi...@chromium.org

Comment #28 on issue 39399 by netmosf...@gmail.com: dataTransfer.dropEffect
not properly set on dragEnter, dragOver, drop, dragEnd
http://code.google.com/p/chromium/issues/detail?id=39399

also, apparently (with a fast test) the dropEffect value is not dispatched
over subsequent events

IE, if I set dropEffect = "copy" in "dragover", at the "drop" event
dropEffect will be, and always be set to "none"

who knows why...

chro...@googlecode.com

unread,
Aug 18, 2012, 2:07:11 PM8/18/12
to chromi...@chromium.org

Comment #29 on issue 39399 by netmosf...@gmail.com: dataTransfer.dropEffect
not properly set on dragEnter, dragOver, drop, dragEnd
http://code.google.com/p/chromium/issues/detail?id=39399

in plus while dragging, holding the CTRL button, on windows,
at the top of the page the page zooms in
at the bottom of the page the page zooms out

IE: try to drag over some text (while holding CTRL) at the coordinates y =
10 x = 10 of any page

is there a way to prevent this?


chro...@googlecode.com

unread,
Sep 19, 2012, 11:26:56 AM9/19/12
to chromi...@chromium.org

Comment #31 on issue 39399 by jjh...@bueller.us: dataTransfer.dropEffect
not properly set on dragEnter, dragOver, drop, dragEnd
http://code.google.com/p/chromium/issues/detail?id=39399

I ran into this problem today when trying to detect if a drag out of the
browse had been canceled.

Since it's been a year since the last major discussion on this, is there
any newer thinking?

Would it be possible to delay the triggering of dragend until the drop
processing has completed?

chro...@googlecode.com

unread,
Apr 20, 2013, 6:58:14 PM4/20/13
to chromi...@chromium.org

Comment #36 on issue 39399 by adrian.a...@gmail.com:
dataTransfer.dropEffect not properly set on dragEnter, dragOver, drop,
dragEnd
http://code.google.com/p/chromium/issues/detail?id=39399

dropEffect is always "none" for me on Windows XPP SP3 when dropping from
browser onto desktop ("move" or "copy" or cancel all lead "none").
navigator.appVersion
"5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/28.0.1483.0 Safari/537.36"
"move" or "copy" or cancel all lead "none".

It works as expected in Ubuntu 12.10 for me (leading "move" or "copy"
or "none" as appropriate).
navigator.appVersion
"5.0 (X11; Linux i686) AppleWebKit/536.11 (KHTML, like Gecko)
Chrome/20.0.1132.57 Safari/536.11"


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

chro...@googlecode.com

unread,
Aug 9, 2013, 9:14:23 AM8/9/13
to chromi...@chromium.org

Comment #37 on issue 39399 by shabbir....@gmail.com:
dataTransfer.dropEffect not properly set on dragEnter, dragOver, drop,
dragEnd
http://code.google.com/p/chromium/issues/detail?id=39399

Any updates on the status of this? Please also mark
https://code.google.com/p/chromium/issues/detail?id=130139 as duplicate and
you can use the testcase and information from there too.

chro...@googlecode.com

unread,
Aug 9, 2013, 12:32:12 PM8/9/13
to chromi...@chromium.org

Comment #38 on issue 39399 by dch...@chromium.org: dataTransfer.dropEffect
not properly set on dragEnter, dragOver, drop, dragEnd
http://code.google.com/p/chromium/issues/detail?id=39399

Issue 130139 has been merged into this issue.

chro...@googlecode.com

unread,
Oct 3, 2013, 3:20:47 PM10/3/13
to chromi...@chromium.org

Comment #39 on issue 39399 by shabbir....@gmail.com:
dataTransfer.dropEffect not properly set on dragEnter, dragOver, drop,
dragEnd
http://code.google.com/p/chromium/issues/detail?id=39399

Are there any updates on this? This and similar issues seem to have been
filed/open for several years now. The test cases are very clear. So, why is
there no progress on this?

chro...@googlecode.com

unread,
Jan 11, 2014, 11:31:28 PM1/11/14
to chromi...@chromium.org

Comment #40 on issue 39399 by starrten...@gmail.com:
dataTransfer.dropEffect not properly set on dragEnter, dragOver, drop,
dragEnd
http://code.google.com/p/chromium/issues/detail?id=39399

If anyone is curious about <file:///trunk/src/app/gtk_dnd_util.cc> I
recommend reading up on file permissions at
<http://stackoverflow.com/questions/4584633/file-permissions-question>.

chro...@googlecode.com

unread,
Apr 7, 2014, 4:59:27 PM4/7/14
to chromi...@chromium.org

Comment #41 on issue 39399 by warumistkeinnamefrei: dataTransfer.dropEffect
not properly set on dragEnter, dragOver, drop, dragEnd
http://code.google.com/p/chromium/issues/detail?id=39399

Every major browser seems to support this now, only Chrome on Windows
doesn't. Because of this you can't even figure out in the dragend event
whether the element was dropped or not. Therefore I have to add a global
variable just to get it working in this browser, which is really
disappointing.

chro...@googlecode.com

unread,
Aug 15, 2014, 6:01:38 AM8/15/14
to chromi...@chromium.org

Comment #45 on issue 39399 by jakearch...@chromium.org:
dataTransfer.dropEffect not properly set on dragEnter, dragOver, drop,
dragEnd
http://code.google.com/p/chromium/issues/detail?id=39399

Demo: https://jsbin.com/pinila/8/edit

Related Webkit issue: https://bugs.webkit.org/show_bug.cgi?id=37012
Reply all
Reply to author
Forward
0 new messages