]> source.dussan.org Git - jquery-ui.git/commitdiff
Sortable: Update _contactContainers to use page clientX/Y values
authordstrohl <dstrohl@users.noreply.github.com>
Tue, 16 Dec 2014 16:05:54 +0000 (08:05 -0800)
committerAlexander Schmitz <arschmitz@gmail.com>
Wed, 30 Mar 2016 22:48:29 +0000 (18:48 -0400)
The sortable was using the window position compared with page position to
determine where to drop objects.  this was only a problem for sortables far
enough down to require scrolling.

Fixes #10727
Fixes #5039
Closes gh-1475
Closes gh-1585

ui/widgets/sortable.js

index 8920ed9674dade7df7f8d525dad7dad6098906c1..59b3bfff0b598ceed593903287b4f1dc483e3c45 100644 (file)
@@ -908,7 +908,7 @@ return $.widget( "ui.sortable", $.ui.mouse, {
                        floating = innermostContainer.floating || this._isFloating( this.currentItem );
                        posProperty = floating ? "left" : "top";
                        sizeProperty = floating ? "width" : "height";
-                       axis = floating ? "clientX" : "clientY";
+                       axis = floating ? "pageX" : "pageY";
 
                        for ( j = this.items.length - 1; j >= 0; j-- ) {
                                if ( !$.contains( this.containers[ innermostIndex ].element[ 0 ], this.items[ j ].item[ 0 ] ) ) {