diff options
author | Felix Nagel <info@felixnagel.com> | 2012-10-12 22:56:45 +0200 |
---|---|---|
committer | Felix Nagel <info@felixnagel.com> | 2012-10-12 22:56:45 +0200 |
commit | c59fbbaad74f7bee73b57985570f689c9a5d9383 (patch) | |
tree | 89209c996ac48c84a0ce20e77061eaef04f87d6c /ui/jquery.ui.draggable.js | |
parent | fc729a8c8ebfbe9c05f8b1ebbd6629898f3fc6c0 (diff) | |
parent | 94221c4e5b11496ef927889e1541d84b5746fb31 (diff) | |
download | jquery-ui-c59fbbaad74f7bee73b57985570f689c9a5d9383.tar.gz jquery-ui-c59fbbaad74f7bee73b57985570f689c9a5d9383.zip |
Merge branch 'master' into selectmenu
Diffstat (limited to 'ui/jquery.ui.draggable.js')
-rw-r--r-- | ui/jquery.ui.draggable.js | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js index 2e33e3311..5d91a3d94 100644 --- a/ui/jquery.ui.draggable.js +++ b/ui/jquery.ui.draggable.js @@ -318,7 +318,7 @@ $.widget("ui.draggable", $.ui.mouse, { } if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information - || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.browser.msie)) //Ugly IE fix + || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.ui.ie)) //Ugly IE fix po = { top: 0, left: 0 }; return { @@ -571,13 +571,29 @@ $.ui.plugin.add("draggable", "connectToSortable", { $.each(inst.sortables, function(i) { + var innermostIntersecting = false; + var thisSortable = this; //Copy over some variables to allow calling the sortable's native _intersectsWith this.instance.positionAbs = inst.positionAbs; this.instance.helperProportions = inst.helperProportions; this.instance.offset.click = inst.offset.click; if(this.instance._intersectsWith(this.instance.containerCache)) { + innermostIntersecting = true; + $.each(inst.sortables, function () { + this.instance.positionAbs = inst.positionAbs; + this.instance.helperProportions = inst.helperProportions; + this.instance.offset.click = inst.offset.click; + if (this != thisSortable + && this.instance._intersectsWith(this.instance.containerCache) + && $.ui.contains(thisSortable.instance.element[0], this.instance.element[0])) + innermostIntersecting = false; + return innermostIntersecting; + }); + } + + if(innermostIntersecting) { //If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once if(!this.instance.isOver) { |