Skip to content

Commit 9aca706

Browse files
dstrohlarschmitz
authored andcommitted
Sortable: Update _contactContainers to use page clientX/Y values
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
1 parent d21aeee commit 9aca706

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ui/widgets/sortable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ return $.widget( "ui.sortable", $.ui.mouse, {
908908
floating = innermostContainer.floating || this._isFloating( this.currentItem );
909909
posProperty = floating ? "left" : "top";
910910
sizeProperty = floating ? "width" : "height";
911-
axis = floating ? "clientX" : "clientY";
911+
axis = floating ? "pageX" : "pageY";
912912

913913
for ( j = this.items.length - 1; j >= 0; j-- ) {
914914
if ( !$.contains( this.containers[ innermostIndex ].element[ 0 ], this.items[ j ].item[ 0 ] ) ) {

0 commit comments

Comments
 (0)