@@ -1253,18 +1253,6 @@ return $.widget("ui.sortable", $.ui.mouse, {
1253
1253
}
1254
1254
1255
1255
this . dragging = false ;
1256
- if ( this . cancelHelperRemoval ) {
1257
- if ( ! noPropagation ) {
1258
- this . _trigger ( "beforeStop" , event , this . _uiHash ( ) ) ;
1259
- for ( i = 0 ; i < delayedTriggers . length ; i ++ ) {
1260
- delayedTriggers [ i ] . call ( this , event ) ;
1261
- } //Trigger all delayed events
1262
- this . _trigger ( "stop" , event , this . _uiHash ( ) ) ;
1263
- }
1264
-
1265
- this . fromOutside = false ;
1266
- return false ;
1267
- }
1268
1256
1269
1257
if ( ! noPropagation ) {
1270
1258
this . _trigger ( "beforeStop" , event , this . _uiHash ( ) ) ;
@@ -1273,10 +1261,12 @@ return $.widget("ui.sortable", $.ui.mouse, {
1273
1261
//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
1274
1262
this . placeholder [ 0 ] . parentNode . removeChild ( this . placeholder [ 0 ] ) ;
1275
1263
1276
- if ( this . helper [ 0 ] !== this . currentItem [ 0 ] ) {
1277
- this . helper . remove ( ) ;
1264
+ if ( ! this . cancelHelperRemoval ) {
1265
+ if ( this . helper [ 0 ] !== this . currentItem [ 0 ] ) {
1266
+ this . helper . remove ( ) ;
1267
+ }
1268
+ this . helper = null ;
1278
1269
}
1279
- this . helper = null ;
1280
1270
1281
1271
if ( ! noPropagation ) {
1282
1272
for ( i = 0 ; i < delayedTriggers . length ; i ++ ) {
@@ -1286,7 +1276,7 @@ return $.widget("ui.sortable", $.ui.mouse, {
1286
1276
}
1287
1277
1288
1278
this . fromOutside = false ;
1289
- return true ;
1279
+ return ! this . cancelHelperRemoval ;
1290
1280
1291
1281
} ,
1292
1282
0 commit comments