File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -43,10 +43,13 @@ $.fn.sortable = function(options) {
43
43
dt . setData ( 'Text' , 'dummy' ) ;
44
44
index = ( dragging = $ ( this ) ) . addClass ( 'sortable-dragging' ) . index ( ) ;
45
45
} ) . on ( 'dragend.h5s' , function ( ) {
46
+ if ( ! dragging ) {
47
+ return ;
48
+ }
46
49
dragging . removeClass ( 'sortable-dragging' ) . show ( ) ;
47
50
placeholders . detach ( ) ;
48
51
if ( index != dragging . index ( ) ) {
49
- items . parent ( ) . trigger ( 'sortupdate' , { item : dragging } ) ;
52
+ dragging . parent ( ) . trigger ( 'sortupdate' , { item : dragging } ) ;
50
53
}
51
54
dragging = null ;
52
55
} ) . not ( 'a[href], img' ) . on ( 'selectstart.h5s' , function ( ) {
@@ -59,6 +62,7 @@ $.fn.sortable = function(options) {
59
62
if ( e . type == 'drop' ) {
60
63
e . stopPropagation ( ) ;
61
64
placeholders . filter ( ':visible' ) . after ( dragging ) ;
65
+ dragging . trigger ( 'dragend.h5s' ) ;
62
66
return false ;
63
67
}
64
68
e . preventDefault ( ) ;
You can’t perform that action at this time.
0 commit comments