Opened 12 years ago

Closed 12 years ago

#11126 closed defect (duplicate)

DnD interferes with scroll

Reported by: Jean-Rubin Leonard Owned by: anonymous
Priority: high Milestone: tbd
Component: General Version: 1.5.0b2
Keywords: DnD scroll scrollbar JsonRestStore Cc:
Blocked By: Blocking:


Hi, this bug is extremely difficult to both explain and reproduce satisfactorily. I am using a dijit.tree backed with a JsonRestStore? and a forestStoreModel. This tree uses dnd therefore has dijit.tree.dndSource as dndController. My problem is sometimes after an item has been dragged within the tree, if I try to use my tree's scrollbar, the dnd avatar comes up even if i am not even close to the tree node. I place my self squarely on the vertical scroll and click on it yet the avatar comes as if I was trying to drag a tree node. This is rather displeasing and makes my application error prone. I've tried reproducing the issue in the attached test file. I was successful reproducing it only when an attempted dnd fails. In my live code however, this issue happens whether a dnd has completed successfully or not.

To reproduce the issue try: 1) expand the node of the trees enough to have a scroll bar 2) try to drag a node around (for exemple try to take the node that says 'newest project portfolio' under 'simulation 1' into the one that says 'engineering' under scenario 2 3) try scrolling up or down (you should see the dnd avatar)

In this test the dnd may fail and you'll be able to reproduce the bug but in my code it happens whether the dnd has successfully completed or not. I believe that regardless how any previous dnd attempt has ended, scrolling the scrollbar should not trigger a dnd.

Attachments (1) (5.4 KB) - added by Jean-Rubin Leonard 12 years ago.

Download all attachments as: .zip

Change History (2)

Changed 12 years ago by Jean-Rubin Leonard

Attachment: added

comment:1 Changed 12 years ago by bill

Resolution: duplicate
Status: newclosed

The issue is when an item (in this case, a TreeNode) is already selected, and then you mouse down on the Tree, which starts the drag. The problem is that mouse-down on the scrollbar is treated as mouse-down on the Tree.

The workaround is simply to put the scrollbar in a surrounding <div> rather than on the Tree.domNode itself.

Dup of #10585.

Note: See TracTickets for help on using tickets.