File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 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) {
4343 dt . setData ( 'Text' , 'dummy' ) ;
4444 index = ( dragging = $ ( this ) ) . addClass ( 'sortable-dragging' ) . index ( ) ;
4545 } ) . on ( 'dragend.h5s' , function ( ) {
46+ if ( ! dragging ) {
47+ return ;
48+ }
4649 dragging . removeClass ( 'sortable-dragging' ) . show ( ) ;
4750 placeholders . detach ( ) ;
4851 if ( index != dragging . index ( ) ) {
49- items . parent ( ) . trigger ( 'sortupdate' , { item : dragging } ) ;
52+ dragging . parent ( ) . trigger ( 'sortupdate' , { item : dragging } ) ;
5053 }
5154 dragging = null ;
5255 } ) . not ( 'a[href], img' ) . on ( 'selectstart.h5s' , function ( ) {
@@ -59,6 +62,7 @@ $.fn.sortable = function(options) {
5962 if ( e . type == 'drop' ) {
6063 e . stopPropagation ( ) ;
6164 placeholders . filter ( ':visible' ) . after ( dragging ) ;
65+ dragging . trigger ( 'dragend.h5s' ) ;
6266 return false ;
6367 }
6468 e . preventDefault ( ) ;
You can’t perform that action at this time.
0 commit comments