Opened 10 years ago
Closed 10 years ago
#9174 closed bug (duplicate)
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
Change History (4)
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
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.
comment:3 Changed 10 years ago by
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.
comment:4 Changed 10 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
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 );