Opened 11 months ago

#15264 new bug

Droppable/draggable do not work with subpixel width/height

Reported by: jkorff Owned by:
Priority: minor Milestone: none
Component: ui.droppable Version: 1.12.1
Keywords: Cc:
Blocked by: Blocking:

Description

Issue

When using jQueryUI (v1.12) with draggable elements which have a width or height that has subpixels (e.g. by using em or rem units) the draggables fly back to their source position even when configured to snap and stay on the target.

Expected behaviour: snap and remain on target.

Browsers affected: All recent (Chrome 62, Firefox 52, IE Edge/11)

I originally thought this to be a bug with jQuery, as downgrading from 3.x to 2.2.4 fixed the issue, but it has been suggested in my (ticket) that jQueryUI might be the culprit.

I've tested the jsFiddle below with jQueryUI 1.12, 1.11 and 1.10, and all show the same problem. 1.9 doesn't work at all.

Link to test case

Minimal test case: (jsFiddle)

To reproduce:

Drag the white boxes onto the drop targets => they'll bounce back (the bug) In the CSS, remove the subpixels in line 35 and 36 => it works as expected Use different values of subpixels to get different failures (no draggable works, just one works etc.)

Change History (0)

Note: See TracTickets for help on using tickets.