Opened 14 years ago
Closed 13 years ago
#4166 closed bug (duplicate)
Resizable does not honor parent scroll
Reported by: | Nathaniel | Owned by: | |
---|---|---|---|
Priority: | critical | Milestone: | 1.9.0 |
Component: | ui.resizable | Version: | 1.6rc6 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I have an absolutely positioned parent with an absolutely positioned resizable within. If I scroll the parent to the left and begin a resize, the resizing element moves left an amount equal to the scrollLeft() of the parent. This can be fixed by simply adding the parent().scrollLeft() to the ui.originalSize.left and the parent().scrollTop() to the ui.originalSize.top, which I am currently doing. However, I am not sure if this is sufficient, as it may mess with things in a place without absolute/absolute positioning.
Attachments (1)
Change History (11)
comment:1 Changed 14 years ago by
Milestone: | TBD → 1.6 |
---|---|
Priority: | major → critical |
comment:2 Changed 14 years ago by
Milestone: | 1.7 → 1.8 |
---|
comment:4 Changed 14 years ago by
Replying to odugen:
First of all position returns absolute position relative to window, thats why scroll of the parent element does not taken into account.
Relative to offset parent, but without scroll :) my bad
comment:5 Changed 13 years ago by
for my scenario, this resolves the issue completely (as far as I can tell):
/* if (o.containment) { curleft += $(o.containment).scrollLeft() || 0; curtop += $(o.containment).scrollTop() || 0; } */ // 2009-12-30 LK parent scroll fix el.parents().each(function(){ curleft += $(this).scrollLeft() || 0; curtop += $(this).scrollTop() || 0; });
comment:6 Changed 13 years ago by
ixnay on the second line, it messes up with browser scroll... horribly.
comment:7 Changed 13 years ago by
current version, seems to be working for me:
// 2009-12-30 LK parent scroll bugfix for http://dev.jqueryui.com/ticket/4166 el.parents().each(function(){ curleft += $(this).scrollLeft() || 0; curtop += $(this).scrollTop() || 0; }); curleft -= this.documentScroll.left; curtop -= this.documentScroll.top;
comment:8 Changed 13 years ago by
sh... sorry...
// 2009-12-30 LK parent scroll bugfix for http://dev.jqueryui.com/ticket/4166 el.parents().each(function(){ curleft += $(this).scrollLeft() || 0; curtop += $(this).scrollTop() || 0; }); curleft -= this.documentScroll.left; curtop -= this.documentScroll.top;
Changed 13 years ago by
Attachment: | testResizeJump.htm added |
---|
comment:9 Changed 13 years ago by
I've made an example (Attachment). But to me it seems that the resizable only jumps the value of this.element.parent().scrollTop() and left respectively.
#3635 seems a duplicate of this bug, I've left a comment there, but cannot mark it as such.