aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2011-05-25 13:12:37 -0700
committerScott González <scott.gonzalez@gmail.com>2011-05-25 13:12:37 -0700
commitfe4ae3045810421d2489175739098deb6852417b (patch)
treef4637ad6e3f19befa2f1245a4006014b05732f4b /ui
parent129d5c75aca94ae636ba6396124c4938e43a50f3 (diff)
parent8e8a7b015f4f5a76c187dfca9af7519ae356bb16 (diff)
downloadjquery-ui-fe4ae3045810421d2489175739098deb6852417b.tar.gz
jquery-ui-fe4ae3045810421d2489175739098deb6852417b.zip
Merge pull request #294 from kborchers/bug_4088
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.
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.sortable.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/jquery.ui.sortable.js b/ui/jquery.ui.sortable.js
index 78349669a..a8084412f 100644
--- a/ui/jquery.ui.sortable.js
+++ b/ui/jquery.ui.sortable.js
@@ -983,7 +983,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]) {