Opened 11 years ago

Closed 11 years ago

Last modified 8 years ago

#4796 closed bug (notabug)

Resizable and draggable with relative position in div container

Reported by: subzero66 Owned by:
Priority: minor Milestone:
Component: ui.resizable Version: 1.7.2
Keywords: relative position, parent container Cc:
Blocked by: Blocking:


I defined two divs with resizable/draggable attributes using a relative position within a parent div container. Dragging works just fine. Both inner divs can be dragged within the parent container. When resizing the first div the second div "jumps" to a different position. When looking at the resizable.js I found that the position it being changed to absolute in line 224:

el.css({ position: 'absolute', top:, left: iniPos.left });

Please find attached my example HTML. It's a modified version of the JQuery example code.

Attachments (1)

resize-relative.html (1.4 KB) - added by subzero66 11 years ago.
Resizable for relative positioned divs

Download all attachments as: .zip

Change History (7)

Changed 11 years ago by subzero66

Attachment: resize-relative.html added

Resizable for relative positioned divs

comment:1 Changed 11 years ago by subzero66

I found out how to work around this. You need to declare the container as relative and the inner divs as absolute.

<div id="inner_container" style="position: relative; height: 800px;">
   <div id="resizable1" style="position: absolute; top: 100px; left: 100px;>

comment:2 Changed 11 years ago by Jörn Zaefferer

Resolution: invalid
Status: newclosed

Sounds like this doesn't require any further actions. Please reopen when it actually does.

comment:3 Changed 11 years ago by webPragmatist

Is there a reason that this is hardcoded into this UI plugin? I am having to now add extra markup just to remove this style.

comment:4 Changed 11 years ago by webPragmatist

My apologies for not further investigating this issue. It seems that the resizable widget looks for ui-draggable as a style in order to determine an absolute or relative positioning.

Is this necessary and if so is it documented?

comment:5 Changed 8 years ago by sureshcjc@…

I have similar problem in my case. This issue is either not solved or I have a bug in my code. Please take a look at and advise.

comment:6 Changed 8 years ago by Scott González

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.