aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaksim Ryzhikov <rv.maksim@gmail.com>2016-04-12 15:39:06 -0400
committerScott González <scott.gonzalez@gmail.com>2016-04-12 15:39:06 -0400
commitc19fc10e8493007af4617597f0afea5f24860955 (patch)
treeeaed2fa751099a47d9c157a2374c1bdf00311188
parent48257cd9cac0584ce399042b2d804526efd7beae (diff)
downloadjquery-ui-c19fc10e8493007af4617597f0afea5f24860955.tar.gz
jquery-ui-c19fc10e8493007af4617597f0afea5f24860955.zip
Sortable: Fix incorrect top containment for document
Fixes #14927 Closes gh-1695
-rw-r--r--ui/widgets/sortable.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/widgets/sortable.js b/ui/widgets/sortable.js
index 59b3bfff0..ec26250b5 100644
--- a/ui/widgets/sortable.js
+++ b/ui/widgets/sortable.js
@@ -1072,7 +1072,7 @@ return $.widget( "ui.sortable", $.ui.mouse, {
0 - this.offset.relative.left - this.offset.parent.left,
0 - this.offset.relative.top - this.offset.parent.top,
o.containment === "document" ? this.document.width() : this.window.width() - this.helperProportions.width - this.margins.left,
- ( o.containment === "document" ? this.document.width() : this.window.height() || this.document[ 0 ].body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top
+ ( o.containment === "document" ? ( this.document.height() || document.body.parentNode.scrollHeight ) : this.window.height() || this.document[ 0 ].body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top
];
}