Modify ↓
Ticket #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: | ||
| Blocking: | Blocked by: |
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
comment:2 Changed 5 years ago by mmohrman
- Status changed from closed to reopened
- Resolution fixed deleted
this.placeholderElement.is(":visible") returns false, so the implemented solution is never executed.
comment:3 Changed 5 years ago by mmohrman
Removing
&& this.placeholderElement.is(":visible")
or using
this.placeholder.is(":visible")
instead appear to be acceptable solutions.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.
