Skip to content

Commit 3f3f357

Browse files
committed
Droppable: Adjust fit tolerance to allow dropping an element exactly the same size as the droppable area. Fixed #5689 - Droppable tolerance fit feature.
1 parent 92b7722 commit 3f3f357

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/jquery.ui.droppable.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ $.ui.intersect = function(draggable, droppable, toleranceMode) {
161161

162162
switch (toleranceMode) {
163163
case 'fit':
164-
return (l < x1 && x2 < r
165-
&& t < y1 && y2 < b);
164+
return (l <= x1 && x2 <= r
165+
&& t <= y1 && y2 <= b);
166166
break;
167167
case 'intersect':
168168
return (l < x1 + (draggable.helperProportions.width / 2) // Right Half

0 commit comments

Comments
 (0)