Skip to main content

Search and Top Navigation

#10085 closed bug (notabug)

Opened June 03, 2014 11:21AM UTC

Closed June 03, 2014 07:30PM UTC

Cannot return to original height after first resize.

Reported by: SFPinkSmartie Owned by: SFPinkSmartie
Priority: minor Milestone: none
Component: ui.resizable Version: 1.10.4
Keywords: Cc:
Blocked by: Blocking:
Description

This is my example: http://jsfiddle.net/wjS7Z/

I have a element set to a height of 35px, the resize function is set to resize by 40px.

After the first resize I cannot return to 35px. If you click the resize handle and slight move the mouse you will see the element jump 5px which seems to be the cause of it not returning to the original height.

However if you switch to jQuery UI 1.10.2 this will work fine.

Attachments (0)
Change History (3)

Changed June 03, 2014 12:38PM UTC by scottgonzalez comment:1

_comment0: The grid option is really mean for the full size of the resizable. Why are you using a grid that doesn't match the original size?1401800006638487
owner: → SFPinkSmartie
status: newpending

The grid option is really meant for the full size of the resizable. Why are you using a grid that doesn't match the original size?

Changed June 03, 2014 02:30PM UTC by SFPinkSmartie comment:2

status: pendingnew

In my actual code I have a grid like a calender, with days and times. A user can drag items into this grid from another container. The cells are set to 40px by 110px and the items are set to 35px by 100px. This allows the items to sit inside the cell. A user can resize these items in different times, but to keep the item in the same position I resize by 40px, but allow it to return to its original size.

Changed June 03, 2014 07:30PM UTC by tj.vantoll comment:3

resolution: → notabug
status: newclosed

Hi SFPinkSmartie,

In my opinion, the size of a resizable element should always be a multiple of the grid dimensions. For your use case, I would recommend applying the cell dimensions to the resizable, and using an inner element to achieve the "sit inside the cell" look. Something kind of like this: http://jsfiddle.net/tj_vantoll/hDfg4/. Alternatively you could increase the size of the cells to 45px and make the original resizable 40px.

If others from the community desire this behavior they can comment or vote on this ticket and we can reinvestigate.