Opened 10 years ago

Closed 6 years ago

#4314 closed bug (invalid)

Sortable: DOM height() not calculated properly after updating, while dragging

Reported by: tehmeph Owned by: tehmeph
Priority: major Milestone: 2.0.0
Component: ui.sortable Version: 1.7
Keywords: Cc:
Blocked by: Blocking:

Description

I've got two connected lists of different widths. One of the items I'm dragging between the two of them has two floated child elements, which, upon dragging out of one sortable list into another, resize, vertically and horizontally.

I'm using a custom animation callback to change the width of the element, which, because of the floats, changes the height as well. I have, however, debugged the output for ui.item.height(), ui.placeholder.height(), and ui.helper.height(), and for one of the widgets the pre-drag height is 133px; after dragging into the new list, and it is visually taller (and thinner), the height calculated by .height() is still 133px and it is not 189px (as it should be) until I begin draggin again.

The end result of this is that some widgets with greater variation in size - one "grows" by as much as 200px - makes the sortable list nearly unusable because of the massive chunk of whitespace between the actively sorted element and it's neighbors.

Source attached.

Attachments (1)

jqbug (3.1 KB) - added by tehmeph 10 years ago.

Download all attachments as: .zip

Change History (9)

Changed 10 years ago by tehmeph

Attachment: jqbug added

comment:1 Changed 10 years ago by Jörn Zaefferer

Milestone: TBD1.7.2

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

Milestone: 1.7.21.8

comment:3 Changed 10 years ago by zertox

Same issue here. After changing the width of the helper opject, the height stays the same.

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

Milestone: 1.9.02.0.0

comment:5 Changed 6 years ago by petersendidit

Owner: set to tehmeph
Status: newpending
Summary: DOM height() not calculated properly after updating, while draggingSortable: DOM height() not calculated properly after updating, while dragging

Thanks for taking the time to contribute to the jQuery UI project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket.

Additionally, be sure to test against the git version of both jQuery UI and jQuery to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/ZgAqH/Open the link and click to "Fork" (in the top menu) to get started.

comment:6 Changed 6 years ago by mikesherov

Owner: tehmeph deleted
Status: pendingnew

petersendidit, can we try making a test case from the attachment instead of pending this one?

comment:7 Changed 6 years ago by mikesherov

Owner: set to tehmeph
Status: newpending

petersendidit, you were right!

comment:8 Changed 6 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Note: See TracTickets for help on using tickets.