mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX #4140 When clicking a tree node that was just dragged, "Stack overflow" error would be given in IE. Firebug would report "Too much recursion"
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@95973 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
6b59dc3e78
commit
69229baeaf
@ -734,23 +734,10 @@ DraggableTreeNode.prototype = {
|
||||
this.aTag._onclick_before_draggable = this.aTag.onclick;
|
||||
this.aTag.baseClick = this.aTag.onclick;
|
||||
|
||||
this.aTag.onclick = this.aTagOnClick.bindAsEventListener(this.aTag);
|
||||
|
||||
if(this.options.onParentChanged) this.onParentChanged = this.options.onParentChanged;
|
||||
if(this.options.onOrderChanged) this.onOrderChanged = this.options.onOrderChanged;
|
||||
},
|
||||
|
||||
aTagOnClick: function(event) {
|
||||
// This will be bound to the <a> tag, not the <li>.
|
||||
if(this.treeNode.wasDragged) {
|
||||
Event.stop(event);
|
||||
return false;
|
||||
} else {
|
||||
this.treeNode.anchorWasClicked = true;
|
||||
this.treeNode.wasDragged = false;
|
||||
return this.baseClick(event);
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Remove all the draggy stuff
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user