@@ -674,7 +674,9 @@ See README.md or https://github.com/fraywing/textAngular/wiki for requirements a
674
674
675
675
// catch element select event and pass to toolbar tools
676
676
scope . $on ( 'ta-element-select' , function ( event , element ) {
677
- _toolbars . triggerElementSelect ( event , element ) ;
677
+ if ( _toolbars . triggerElementSelect ( event , element ) ) {
678
+ scope [ 'reApplyOnSelectorHandlerstaTextElement' + _serial ] ( ) ;
679
+ }
678
680
} ) ;
679
681
680
682
scope . $on ( 'ta-drop-event' , function ( event , element , dropEvent , dataTransfer ) {
@@ -687,7 +689,7 @@ See README.md or https://github.com/fraywing/textAngular/wiki for requirements a
687
689
try {
688
690
$q . when ( scope . fileDropHandler ( file , scope . wrapSelection ) ||
689
691
( scope . fileDropHandler !== scope . defaultFileDropHandler &&
690
- scope . defaultFileDropHandler ( file , scope . wrapSelection ) ) ) . finally ( function ( ) {
692
+ $q . when ( scope . defaultFileDropHandler ( file , scope . wrapSelection ) ) ) ) . then ( function ( ) {
691
693
scope [ 'updateTaBindtaTextElement' + _serial ] ( ) ;
692
694
} ) ;
693
695
} catch ( error ) {
@@ -696,6 +698,11 @@ See README.md or https://github.com/fraywing/textAngular/wiki for requirements a
696
698
} ) ;
697
699
dropEvent . preventDefault ( ) ;
698
700
dropEvent . stopPropagation ( ) ;
701
+ /* istanbul ignore else, the updates if moved text */
702
+ } else {
703
+ $timeout ( function ( ) {
704
+ scope [ 'updateTaBindtaTextElement' + _serial ] ( ) ;
705
+ } , 0 ) ;
699
706
}
700
707
} ) ;
701
708
@@ -1274,7 +1281,11 @@ See README.md or https://github.com/fraywing/textAngular/wiki for requirements a
1274
1281
if ( event . originalEvent ) dataTransfer = event . originalEvent . dataTransfer ;
1275
1282
else dataTransfer = event . dataTransfer ;
1276
1283
scope . $emit ( 'ta-drop-event' , this , event , dataTransfer ) ;
1277
- $timeout ( function ( ) { dropFired = false ; } , 100 ) ;
1284
+ $timeout ( function ( ) {
1285
+ dropFired = false ;
1286
+ _setViewValue ( ) ;
1287
+ _reApplyOnSelectorHandlers ( ) ;
1288
+ } , 100 ) ;
1278
1289
}
1279
1290
} ;
1280
1291
0 commit comments