diff --git a/modules/tabbarDNDObserver.js b/modules/tabbarDNDObserver.js index 5f311535..21e66b77 100644 --- a/modules/tabbarDNDObserver.js +++ b/modules/tabbarDNDObserver.js @@ -853,12 +853,11 @@ try{ } } - this.clearDropPosition(); - if ( !info.canDrop || observer._setEffectAllowedForDataTransfer(aEvent) == 'none' ) { + this.clearDropPosition(); aEvent.dataTransfer.effectAllowed = "none"; return true; } @@ -870,12 +869,16 @@ try{ if (tab) indicatorTab = tab; } - indicatorTab.setAttribute( - sv.kDROP_POSITION, - info.position == sv.kDROP_BEFORE ? 'before' : + let dropPos = info.position == sv.kDROP_BEFORE ? 'before' : + + info.position == sv.kDROP_AFTER ? 'after' : - 'self' - ); + 'self'; + if (indicatorTab.getAttribute(sv.kDROP_POSITION) != dropPos) { + this.clearDropPosition(); + indicatorTab.setAttribute(sv.kDROP_POSITION, dropPos); + } + var indicator = b.mTabDropIndicatorBar || b.tabContainer._tabDropIndicator; indicator.setAttribute('dragging', (info.position == sv.kDROP_ON || sv.isVertical) ? 'false' : 'true' );