Opened 11 years ago

Closed 11 years ago

#7799 closed defect (worksforme)

Tree : DnD and Webkit

Reported by: rdunklau Owned by:
Priority: high Milestone: tbd
Component: Dijit Version: 1.2beta
Keywords: Cc:
Blocked By: Blocking:


It seems that the tree drag'n drop doesn't work anymore (see dijit/tests/tree/test_tree_dnd.html and try to drag a node from the bottom left tree to the bottom right one).

Moreover, it seems that dragging a tree node over another tree causes an error in webkit-based browser (noticed both in Chrome and Safari). This error seems to appear in the _changeState method, which is called with an undefined value for the "type" parameter.

_changeState: function(type, newState){
newState: String: new state
var prefix = "dojoDnd" + type;
var state  = type.toLowerCase() + "State";             <----- should test wether type is a string
dojo.replaceClass(this.node, prefix + newState, prefix + this[state]);
dojo.removeClass(this.node, prefix + this[state]);
dojo.addClass(this.node, prefix + newState);
this[state] = newState;

Attachments (1)

test_Tree_DnD.html (6.9 KB) - added by rdunklau 11 years ago.
Test Case

Download all attachments as: .zip

Change History (4)

Changed 11 years ago by rdunklau

Attachment: test_Tree_DnD.html added

Test Case

comment:1 Changed 11 years ago by rdunklau

Sorry, but the ticket is invalid. The bug doesnot happenslike this.

What really happens is that in Safari (and in Chrome with Webkit web inspector turned on), the function document.createElement doesnot return an instance of HTMLElement. Therefore, the dojo.getComputedStyle call in dojo.dnd.autoscrollNodes(node) fails. And the avatar is not displayed.

Please see the attached test case, and try dragging an element on the red zone. It will fail. Please see for additional information.

comment:2 Changed 11 years ago by bill

Component: GeneralDijit
Owner: anonymous deleted
severity: criticalnormal

Hmm, I'm not seeing any problem.

What did you mean by "element" in the comment above? And how does the drop "fail"?

In any case I tried dropping various things into the red zone with no apparent error. The item just disappears though.

comment:3 Changed 11 years ago by bill

Resolution: worksforme
Status: newclosed
Note: See TracTickets for help on using tickets.