Skip to main content

Search and Top Navigation

#9174 closed bug (duplicate)

Opened March 21, 2013 02:41PM UTC

Closed March 22, 2013 12:18PM UTC

typo in jquery.ui.resizable

Reported by: scato.eggen Owned by:
Priority: minor Milestone: none
Component: ui.resizable Version: 1.10.1
Keywords: Cc:
Blocked by: Blocking:
Description

woset = Math.abs( (that._helper ? that.offset.left - cop.left : (that.offset.left - co.left)) + that.sizeDiff.width );

should be:

woset = Math.abs( (that._helper ? that.offset.left - co.left : (that.offset.left - co.left)) + that.sizeDiff.width );

this fixes a bug in horizontal resizing that doesn't apply to vertical resizing: namely that it didn't stick to the containment box

Attachments (0)
Change History (4)

Changed March 21, 2013 02:43PM UTC by scato.eggen comment:1

SORRY... the first line is already correct, the second line is incorrect in a different way...

this is the line in the current code (1.10.2 as well):

woset = Math.abs( (that._helper ? that.offset.left - cop.left : (that.offset.left - cop.left)) + that.sizeDiff.width );

this is what it should be:

woset = Math.abs( (that._helper ? that.offset.left - cop.left : (that.offset.left - co.left)) + that.sizeDiff.width );

Changed March 22, 2013 01:58AM UTC by tj.vantoll comment:2

Hi scato.eggen,

Thanks for taking the time to contribute to the jQuery UI project. Could you please provide a test case that shows the containment issue that occurs from this? You can use this as a starting point: http://jsfiddle.net/tj_vantoll/82Ka5/.

Thanks.

Changed March 22, 2013 08:36AM UTC by scato.eggen comment:3

Thanks for the starting point.

This is a test case.

http://jsfiddle.net/v392b/

Looking at the code, I saw this:

if(isParent && isOffsetRelative) {

woset -= that.parentData.left;

}

This looks like a hack to elimate the bug, but it only kicks in if the container is the direct parent. You should delete this hack, since it won't be needed anymore. (By the way, you can tell it's a hack because it only applies to woset, not hoset.)

Hope this helps.

Changed March 22, 2013 12:18PM UTC by tj.vantoll comment:4

resolution: → duplicate
status: newclosed

Duplicate of #7485.Thanks, this is a duplicate of #7485. I'll post your test case there.