Opened 15 years ago

Closed 15 years ago

#3316 closed defect (fixed)

DnD 0.9: Bug on cancelling drop

Reported by: guest Owned by: Eugene Lazutkin
Priority: high Milestone: 0.9beta
Component: DnD Version: 0.9
Keywords: Cc:
Blocked By: Blocking:


I think that I've found another bug in new DnD API, Here is an example scenario:

  1. Try to start dragging a draggable node
  2. Drop it outside the source to cancel whole dragging operation.
  3. Now try to drag an empty space (like in Ticket #3230) or try to drag a node that is not draggable but is a child of source node.
  4. You will see avatar with info that you're dragging an item that you wanted to drag previously.

I think that there should be a call to selector.js#selectNone() at source.js#onDndCancel(). It fixes that problem, but it clears selection, which may be unwanted behaviour in some cases. Maybe a better place for clearing previous selection would be selector.js#onMouseDown():


Change History (3)

comment:1 Changed 15 years ago by Eugene Lazutkin

Status: newassigned

More info from the mailing list (from Marek Kałużny):

Problem is when you have only one source with empty accept array. Then DnD doesn't work at all. Try to comment out c2 and c3 from demos/dnd2/flickr_viewer.html, and pass an empty array accept to c1:

c1 = new dojo.dnd2.Source("container1", {creator: main_creator, accept:[]});

When you have only one Source on the page and you start dragging a node, the DnD operation actually never ends. If you drop dragged node somewhere and only move mouse over source (without clicking!) the whole DnD operation starts from begining.

comment:2 Changed 15 years ago by Eugene Lazutkin

Hmm, the original report doesn't look like a bug. Actually it is the intended behavior --- the selection is still here after canceling the drop, and it is possible to drag the whole selection just by dragging any area in the source. But the additional info does look like a bug.

comment:3 Changed 15 years ago by Eugene Lazutkin

Resolution: fixed
Status: assignedclosed

(In [8987]) Added a missing mouse button state change. Fixes #3316.

Note: See TracTickets for help on using tickets.