diff options
author | Paul Bakaus <paul.bakaus@googlemail.com> | 2009-01-27 14:58:05 +0000 |
---|---|---|
committer | Paul Bakaus <paul.bakaus@googlemail.com> | 2009-01-27 14:58:05 +0000 |
commit | 24d450b7fe31e8f45628301f6df91badd00d71ca (patch) | |
tree | 16fa387bc9dace83b890428398b9634d0c943a61 /ui/ui.droppable.js | |
parent | 98fc50ab1370a4b5a1a5b37f27a37e544205acf6 (diff) | |
download | jquery-ui-24d450b7fe31e8f45628301f6df91badd00d71ca.tar.gz jquery-ui-24d450b7fe31e8f45628301f6df91badd00d71ca.zip |
droppable: 'this' in accept should point to the DOMelement not to a jQuery (fixes #3955)
Diffstat (limited to 'ui/ui.droppable.js')
-rw-r--r-- | ui/ui.droppable.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ui/ui.droppable.js b/ui/ui.droppable.js index 72449d7d4..d0a2f81c5 100644 --- a/ui/ui.droppable.js +++ b/ui/ui.droppable.js @@ -76,7 +76,7 @@ $.widget("ui.droppable", { var draggable = $.ui.ddmanager.current; if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element - if (this.options.accept.call(this.element,(draggable.currentItem || draggable.element))) { + if (this.options.accept.call(this.element[0],(draggable.currentItem || draggable.element))) { if(this.options.hoverClass) this.element.addClass(this.options.hoverClass); this._trigger('over', event, this.ui(draggable)); } @@ -88,7 +88,7 @@ $.widget("ui.droppable", { var draggable = $.ui.ddmanager.current; if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element - if (this.options.accept.call(this.element,(draggable.currentItem || draggable.element))) { + if (this.options.accept.call(this.element[0],(draggable.currentItem || draggable.element))) { if(this.options.hoverClass) this.element.removeClass(this.options.hoverClass); this._trigger('out', event, this.ui(draggable)); } @@ -109,7 +109,7 @@ $.widget("ui.droppable", { }); if(childrenIntersection) return false; - if(this.options.accept.call(this.element,(draggable.currentItem || draggable.element))) { + if(this.options.accept.call(this.element[0],(draggable.currentItem || draggable.element))) { if(this.options.activeClass) this.element.removeClass(this.options.activeClass); if(this.options.hoverClass) this.element.removeClass(this.options.hoverClass); this._trigger('drop', event, this.ui(draggable)); @@ -203,7 +203,7 @@ $.ui.ddmanager = { droppablesLoop: for (var i = 0; i < m.length; i++) { - if(m[i].options.disabled || (t && !m[i].options.accept.call(m[i].element,(t.currentItem || t.element)))) continue; //No disabled and non-accepted + if(m[i].options.disabled || (t && !m[i].options.accept.call(m[i].element[0],(t.currentItem || t.element)))) continue; //No disabled and non-accepted for (var j=0; j < list.length; j++) { if(list[j] == m[i].element[0]) { m[i].proportions.height = 0; continue droppablesLoop; } }; //Filter out elements in the current dragged item m[i].visible = m[i].element.css("display") != "none"; if(!m[i].visible) continue; //If the element is not visible, continue @@ -224,7 +224,7 @@ $.ui.ddmanager = { if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance)) dropped = this._drop.call(this, event); - if (!this.options.disabled && this.visible && this.options.accept.call(this.element,(draggable.currentItem || draggable.element))) { + if (!this.options.disabled && this.visible && this.options.accept.call(this.element[0],(draggable.currentItem || draggable.element))) { this.isout = 1; this.isover = 0; this._deactivate.call(this, event); } |