File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ export class DDDroppable extends DDBaseImplement implements HTMLElementExtendOpt
9494
9595 // make sure when we enter this, that the last one gets a leave FIRST to correctly cleanup as we don't always do
9696 if ( DDManager . dropElement && DDManager . dropElement !== this ) {
97- DDManager . dropElement . _mouseLeave ( e as DragEvent ) ;
97+ DDManager . dropElement . _mouseLeave ( e as DragEvent , true ) ;
9898 }
9999 DDManager . dropElement = this ;
100100
@@ -108,7 +108,7 @@ export class DDDroppable extends DDBaseImplement implements HTMLElementExtendOpt
108108 }
109109
110110 /** @internal called when the item is leaving our area, stop tracking if we had moving item */
111- protected _mouseLeave ( e : MouseEvent ) : void {
111+ protected _mouseLeave ( e : MouseEvent , external = false ) : void {
112112 // console.log(`${count++} Leave ${this.el.id || (this.el as GridHTMLElement).gridstack.opts.id}`); // TEST
113113 if ( ! DDManager . dragElement || DDManager . dropElement !== this ) return ;
114114 e . preventDefault ( ) ;
@@ -120,7 +120,7 @@ export class DDDroppable extends DDBaseImplement implements HTMLElementExtendOpt
120120 }
121121 this . triggerEvent ( 'dropout' , ev ) ;
122122
123- if ( DDManager . dropElement === this ) {
123+ if ( ! external && DDManager . dropElement === this ) {
124124 delete DDManager . dropElement ;
125125 // console.log('not tracking'); // TEST
126126
You can’t perform that action at this time.
0 commit comments