mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Sortable: Changed to check the parent's length so that the dom position of the removed element is not updated. Fixed #4088 - Unable to remove() ui.draggable (sortable item) immediately after the drop callback.
(cherry picked from commit 8e8a7b015f
)
This commit is contained in:
parent
9c0cd47784
commit
ed65ce7a14
2
ui/jquery.ui.sortable.js
vendored
2
ui/jquery.ui.sortable.js
vendored
@ -984,7 +984,7 @@ $.widget("ui.sortable", $.ui.mouse, {
|
||||
|
||||
// We first have to update the dom position of the actual currentItem
|
||||
// Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088)
|
||||
if(!this._noFinalSort && this.currentItem[0].parentNode) this.placeholder.before(this.currentItem);
|
||||
if(!this._noFinalSort && this.currentItem.parent().length) this.placeholder.before(this.currentItem);
|
||||
this._noFinalSort = null;
|
||||
|
||||
if(this.helper[0] == this.currentItem[0]) {
|
||||
|
Loading…
Reference in New Issue
Block a user