Bug Tracker

Opened 15 years ago

Closed 14 years ago

#2762 closed bug (fixed)

.ui-sortable-placeholder width not updated on rearrange in ui.sortable.js

Reported by: mmohrman Owned by: brandon
Priority: minor Milestone: 1.2.3
Component: dimensions Version: 1.2.3
Keywords: Cc:
Blocked by: Blocking:


When sorting an unordered list, the width for the placerholder element, .ui-sortable-placeholder, is not updated. So, for example, if you move an outermost list item inward (to be the child of a sibling list item), the placeholder div stretches beyond the root list.



if(this.placeholderElement) this.placeholder.css(this.placeholderElement.offset());


if(this.placeholderElement) this.placeholder.css(this.placeholderElement.offset()).css({ width: this.placeholderElement.outerWidth() });

On ~line 485 in ui.sortable.js

Thank you.

Change History (5)

comment:1 Changed 15 years ago by paul

Resolution: fixed
Status: newclosed

comment:2 Changed 15 years ago by mmohrman

Resolution: fixed
Status: closedreopened

this.placeholderElement.is(":visible") returns false, so the implemented solution is never executed.

comment:3 Changed 15 years ago by mmohrman


&& this.placeholderElement.is(":visible")

or using


instead appear to be acceptable solutions.

comment:4 Changed 15 years ago by paul

Component: uidimensions
Owner: changed from paul to brandon
Status: reopenednew

This wouldn't work, because outerHeight reports a wrong result when the visibility of a element or parent is set to hidden. Brandon, any idea?

comment:5 Changed 14 years ago by brandon

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.