gh-14545: Correctly handle dnd moving a tab to an empty space (gh-14562)

This commit is contained in:
Andrey Bochkarev
2026-07-12 18:29:29 +03:00
committed by GitHub
parent a1a2268f9b
commit e837158e4c

View File

@@ -1336,7 +1336,8 @@
// Essentials should be properly handled by ::animateVerticalPinnedGridDragOver
if (!dropElement || dropElement.hasAttribute("zen-essential")) {
this.clearDragOverVisuals();
return null;
// If dropElement is null or essential, dropElement should be the empty tab
return [dropBefore, gZenWorkspaces._emptyTab];
}
if (dropElement.hasAttribute("zen-empty-tab") && dropElement.group) {
let secondTab = dropElement.group.tabs[1];