fauzi28 / dynatree

Automatically exported from code.google.com/p/dynatree
0 stars 0 forks source link

Drag and Drop helper does not show dragged item text when drag start from icon or left of it (tree part) #458

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Begin drag operation from tree element icon
2. Watch at the dragged helper text (appears as empty)

If possible, please attach an example HTML file (e.g. a copy of `doc/_test-
ISSUE.html`), that reproduces the problem when copied
into the dynatree/doc/ folder or reproduce on jsFiddle:
Any of the drag & drop samples would do - 
http://wwwendt.de/tech/dynatree/doc/samples.html

What is the expected output? What do you see instead?
Expect to see dragged item's full text, just as happens when beginning the drag 
operation from item text.

What version of the dynatree and jQuery are you using?
1.2.4
On what operating system and browser?
Windows 7/Chrome (reproduces on any)

What DOCTYPE declaration are you using?
any

Please provide any additional information below.
The root cause in the code is in lines #2747-2748: 

            var $helper = $("<div class='dynatree-drag-helper'><span class='dynatree-drag-helper-img' /></div>")
                .append($(event.target).closest(".dynatree-title").clone());

when the event drag starts from the icon, the above 'closest' operation call 
does not return the sought after element as it is not contained in it. 
Making the following change addresses this:
            var $helper = $("<div class='dynatree-drag-helper'><span class='dynatree-drag-helper-img' /><a>" +node.data.title + "</a></div>");

Original issue reported on code.google.com by nmard...@gmail.com on 20 Oct 2013 at 12:22

GoogleCodeExporter commented 8 years ago

Original comment by moo...@wwwendt.de on 24 Oct 2013 at 5:49

GoogleCodeExporter commented 8 years ago

Original comment by moo...@wwwendt.de on 19 Nov 2013 at 6:36

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r692.

Original comment by moo...@wwwendt.de on 7 Dec 2013 at 11:36