Ticket #7193 (closed bug: duplicate)

Opened 3 years ago

Last modified 22 months ago

Resizable: Delta is applied to returned size in resize event but not to element

Reported by: Nimphious Owned by:
Priority: minor Milestone: 2.0.0
Component: ui.resizable Version: 1.8.11
Keywords: haspatch Cc:
Blocking: Blocked by:

Description

When resizing a resizable element, the difference between the previous and new sizes is applied to the previous size and returned, but is not applied to the resizable until the next resize event call.

 http://jsbin.com/inujo

Why is the last resize calculation not applied to the element, but is returned by the resize event?

Change History

comment:2 Changed 3 years ago by Nimphious

Sorry, pasting the link missed the digit at the end.

 http://jsbin.com/inujo4

comment:3 Changed 3 years ago by rdworth

I find it a lot easier to see with more contrasting colors:  http://jsbin.com/inujo4/2

Note that when you resize quickly to make the boxes smaller some red shows through around the right and bottom of the yellow.

comment:4 Changed 3 years ago by rdworth

This is fixed by changing

// plugins callbacks need to be called first
this._propagate("resize", event);

el.css({
	top: this.position.top + "px", left: this.position.left + "px",
	width: this.size.width + "px", height: this.size.height + "px"
});

if (!this._helper && this._proportionallyResizeElements.length)
	this._proportionallyResize();

this._updateCache(data);

// calling the user callback at the end
this._trigger('resize', event, this.ui());

to

// plugins callbacks need to be called first
this._propagate("resize", event);

if (!this._helper && this._proportionallyResizeElements.length)
	this._proportionallyResize();

this._updateCache(data);

el.css({
	top: this.position.top + "px", left: this.position.left + "px",
	width: this.size.width + "px", height: this.size.height + "px"
});

// calling the user callback at the end
this._trigger('resize', event, this.ui());

No idea if this would cause other issues

comment:5 Changed 2 years ago by scott.gonzalez

  • Milestone changed from 1.9.0 to 2.0.0

comment:6 Changed 23 months ago by mikesherov

  • Keywords haspatch added
  • Status changed from new to open
  • Summary changed from Delta is applied to returned size value in resizable's resize event but not to element to Resizable: Delta is applied to returned size in resize event but not to element

comment:7 Changed 23 months ago by eromba

This looks like a duplicate of #5817 -- in my testing, the proposed fix for that issue seems to resolve this one as well.

comment:8 Changed 22 months ago by mikesherov

  • Status changed from open to closed
  • Resolution set to duplicate

Duplicate of #5817.

Note: See TracTickets for help on using tickets.