From 37cbb39ae3e968b0ab2ba488121041fda7a020da Mon Sep 17 00:00:00 2001 From: "David L. Carrithers" Date: Mon, 11 Mar 2013 13:02:23 -0400 Subject: [PATCH] Sortable: Added additional check to make sure this.scrollParent[0].offsetHeight is less than .height(). Fixed #9121 - Auto scrolling (i.e. scroll:true) with Sortable/Draggable hasn't worked since jquery-ui 1.8.24 powered by jQuery 1.8.2 --- ui/jquery.ui.sortable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/jquery.ui.sortable.js b/ui/jquery.ui.sortable.js index 0f9b113a4aa..956a0d02466 100644 --- a/ui/jquery.ui.sortable.js +++ b/ui/jquery.ui.sortable.js @@ -309,7 +309,7 @@ $.widget("ui.sortable", $.ui.mouse, { //Do scrolling if(this.options.scroll) { - if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") { + if((this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") && (this.scrollParent[0].offsetHeight < $(window).height())) { if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) { this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed;