Opened 8 years ago

Last modified 8 years ago

#12980 new bug

Resizable child can go outside containment when margin is in play.

Reported by: tswaters Owned by:
Priority: minor Milestone: none
Component: ui.resizable Version: 1.11.4
Keywords: Cc:
Blocked by: Blocking:


Please see attached jsFiddle:


When a child element with a margin has containment set to parent, the resize operation can go outside of the parent -- to the tune of the size of the margin.

Expected Results:

Resize operation is blocked.

Actual Results:

Resize is allowed to go outside the bounds of the parent.


In the attached jsFiddle ( you can disable the margin and the resize will be properly contained to the parent element.

It should also be noted that dragging does work as expected here -- when the child has a margin the drag operation is blocked at the edge of the container and the margin of the child is respected. I didn't include that in the test case so as to muddy the waters, but if you replace 'resizable' with 'draggable' in the javascript section, you can see this behaviour.

I will be reviewing the code shorly to see if I can't figure it out and may sign CLA / send pull request if I find anything. Stay tuned!

Change History (1)

comment:1 Changed 8 years ago by tswaters

I've submitted a pull request:


Note: See TracTickets for help on using tickets.