Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#5689 closed bug (fixed)

Droppable tolerance fit feature

Reported by: Pavel Owned by:
Priority: minor Milestone: 1.8.3
Component: ui.droppable Version: 1.8.1
Keywords: Cc:
Blocked by: Blocking:

Description

Hi,

I have been playing around with the draggable & droppable and noticed that if the draggable element has the same dimensions with the droppable element, the drop event is never triggered. I could not figure out whether this was a bug or a feature though.

I got it working by editing jquery.ui.droppable.js at line 163 from

case 'fit':
return (l < x1 && x2 < r
	&& t < y1 && y2 < b);
break;

to

case 'fit':
return (l <= x1 && x2 <= r
	&& t <= y1 && y2 <= b);
break;

Thanks

Change History (3)

comment:1 Changed 6 years ago by scottgonzalez

  • Milestone changed from TBD to 1.9
  • Resolution set to fixed
  • Status changed from new to closed

Fixed in 3f3f357. Thanks Pavel.

comment:2 Changed 6 years ago by scottgonzalez

  • Milestone changed from 1.9 to 1.8.3

comment:3 Changed 6 years ago by Scott González

Droppable: Adjust fit tolerance to allow dropping an element exactly the same size as the droppable area. Fixed #5689 - Droppable tolerance fit feature.

Changeset: 3f3f3571715d74d67fbf05d10f1815a087b7055b

Note: See TracTickets for help on using tickets.