Opened 12 years ago

Closed 11 years ago

#3067 closed bug (fixed)

Resizeable and containment works incorrectly

Reported by: tjerkw@… Owned by: eduardo
Priority: major Milestone: 1.7
Component: ui.resizable Version: 1.5.1
Keywords: containment out of bounds Cc:
Blocked by: Blocking:


When using the resizable ui behaviour like this:

var options={
			containmentFix:this.getDayNode(), handles:"n,s",

(where getDayNode and onchange are specified).

Then the resizeable will resize out of the containment element if there are enough other elements above the contianment elements.

I craeted my own fix, but i dont think this fix is the correct fix for everyone.

I craeted my own containmentFix plugin add like this:

$.ui.plugin.add("resizable", "containmentFix", {

Where all checks for (co.helper ? A : B) where simplified to A.

For example the resize method has the following code:

if ( < ( {
			self.size.height = self.size.height + ( -;
			if (pRatio) self.size.width = self.size.height / o.aspectRatio; =;

The current code base is like this:

if ( < (o.helper ? : 0)) {

			self.size.height = self.size.height + (o.helper ? ( - :;

			if (pRatio) self.size.width = self.size.height / o.aspectRatio; = o.helper ? : 0;


Hope this gives you enough information to fix this bug. Or maybe i must specify a helper in my options?

I dont know, this was at least awkward enough to file this bug.

Change History (3)

comment:1 Changed 12 years ago by paul


comment:2 Changed 12 years ago by Cloudream

Milestone: 1.6b1.6

comment:3 Changed 11 years ago by eduardo

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.