message: Fix the drag and drop on the TabWidget when the tabs are hidden
diff: @@ -490,12 +490,14 @@ export class TabWidget extends ThemeableElementBase {
  const tabBar = this._getTabbar();
  const childElements = DomUtils.toArray(tabBar.children).filter(kid => kid.classList.contains(CLASS_TAB));
  - const rect = this.getBoundingClientRect();
  + const wholeWidgetRect = this.getBoundingClientRect();
  +
  + if (this._showTabs) {
  if (pointerTabIndex === 0) {
  // Left end of the tab bar.
  const kid = childElements[pointerTabIndex];
  const kidRect = kid.getBoundingClientRect();
  - indicatorX = Math.floor((kidRect.left + rect.left ) / 2);
  + indicatorX = Math.floor((kidRect.left + wholeWidgetRect.left ) / 2);
  } else if (pointerTabIndex < childElements.length) {
  // Somewhere in the middle.
  @@ -510,10 +512,13 @@ export class TabWidget extends ThemeableElementBase {
  // Right of the tab bar.
  const kid = childElements[childElements.length-1];
  const kidRect = kid.getBoundingClientRect();
  - indicatorX = Math.floor((kidRect.right + rect.right) /2);
  + indicatorX = Math.floor((kidRect.right + wholeWidgetRect.right) /2);
  + }
  + } else {
  + indicatorX = Math.floor((wholeWidgetRect.left + wholeWidgetRect.right) /2);
  }
  - indicatorX -= rect.left;
  + indicatorX -= wholeWidgetRect.left;
  dragIndicatorContainer.style.left = "" + indicatorX + "px";
  dragIndicatorContainer.classList.add(CLASS_INDICATOR_SHOW);
  dragIndicatorContainer.classList.remove(CLASS_INDICATOR_HIDE);
  