aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorJason Moon <jmoon@socialcast.com>2013-03-21 09:56:39 -0500
committerMike Sherov <mike.sherov@gmail.com>2013-03-23 15:42:38 -0400
commitf306a826a4d3b4c36c3f86cb5feeee23bb0db4c3 (patch)
tree45862b3b1f7033364becc2c0fbe6e51b7cfc0f4e /ui
parentae4753b3f1c8d320e11a63f028ec02dc621d24e9 (diff)
downloadjquery-ui-f306a826a4d3b4c36c3f86cb5feeee23bb0db4c3.tar.gz
jquery-ui-f306a826a4d3b4c36c3f86cb5feeee23bb0db4c3.zip
Sortable: update placeholder when axis is x or y for connected lists. Fixed #8301 - Placeholder doesn't move when using connectWith option
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.sortable.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/jquery.ui.sortable.js b/ui/jquery.ui.sortable.js
index 642d5d947..d16407216 100644
--- a/ui/jquery.ui.sortable.js
+++ b/ui/jquery.ui.sortable.js
@@ -535,7 +535,9 @@ $.widget("ui.sortable", $.ui.mouse, {
b = t + item.height,
dyClick = this.offset.click.top,
dxClick = this.offset.click.left,
- isOverElement = (y1 + dyClick) > t && (y1 + dyClick) < b && (x1 + dxClick) > l && (x1 + dxClick) < r;
+ isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t && ( y1 + dyClick ) < b ),
+ isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l && ( x1 + dxClick ) < r ),
+ isOverElement = isOverElementHeight && isOverElementWidth;
if ( this.options.tolerance === "pointer" ||
this.options.forcePointerForContainers ||