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: |
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.
Change History (5)
comment:1 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 Changed 15 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:3 Changed 15 years ago by
Removing
&& this.placeholderElement.is(":visible")
or using
this.placeholder.is(":visible")
instead appear to be acceptable solutions.
comment:4 Changed 15 years ago by
Component: | ui → dimensions |
---|---|
Owner: | changed from paul to brandon |
Status: | reopened → new |
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
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
this.placeholderElement.is(":visible") returns false, so the implemented solution is never executed.