Skip to main content

Bug Tracker

Side navigation

#2762 closed bug (fixed)

Opened April 30, 2008 02:33AM UTC

Closed March 18, 2009 03:27AM UTC

.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:
Description

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.

Fix:

Change

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

To

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

On

~line 485 in ui.sortable.js

Thank you.

Attachments (0)
Change History (5)

Changed April 30, 2008 10:04AM UTC by paul comment:1

resolution: → fixed
status: newclosed

Changed April 30, 2008 07:59PM UTC by mmohrman comment:2

resolution: fixed
status: closedreopened

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

Changed April 30, 2008 08:46PM UTC by mmohrman comment:3

Removing

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

or using

this.placeholder.is(":visible")

instead appear to be acceptable solutions.

Changed May 03, 2008 08:41AM UTC by paul comment:4

component: uidimensions
owner: paulbrandon
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?

Changed March 18, 2009 03:27AM UTC by brandon comment:5

resolution: → fixed
status: newclosed