Ticket #7799 (closed defect: worksforme)

Opened 3 months ago

Last modified 7 weeks ago

Tree : DnD and Webkit

Reported by: rdunklau Owned by:
Priority: normal Milestone: tbd
Component: Dijit Version: 1.2beta
Severity: normal Keywords:
Cc:

Description

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

test_Tree_DnD.html (6.9 kB) - added by rdunklau 3 months ago.
Test Case

Change History

Changed 3 months ago by rdunklau

Test Case

Changed 3 months 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 http://dojotoolkit.org/forum/dojo-foundation/general-discussion/chrome-strange-behaviors for additional information.

Changed 2 months ago by bill

  • owner deleted
  • component changed from General to Dijit
  • severity changed from critical to normal

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.

Changed 7 weeks ago by bill

  • status changed from new to closed
  • resolution set to worksforme
Note: See TracTickets for help on using tickets.