Ticket #5689 (closed bug: fixed)

Opened 4 years ago

Last modified 4 years ago

Droppable tolerance fit feature

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

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

comment:1 Changed 4 years ago by scott.gonzalez

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

Fixed in  3f3f357. Thanks Pavel.

comment:2 Changed 4 years ago by scott.gonzalez

  • Milestone changed from 1.9 to 1.8.3

comment:3 Changed 4 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.