diff --git a/src/zen/drag-and-drop/ZenDragAndDrop.js b/src/zen/drag-and-drop/ZenDragAndDrop.js index 7534706b9..fbe896e32 100644 --- a/src/zen/drag-and-drop/ZenDragAndDrop.js +++ b/src/zen/drag-and-drop/ZenDragAndDrop.js @@ -1229,6 +1229,10 @@ let showIndicatorUnderNewTabButton = false; let dropBefore = false; let dropElementFromEvent = event.target.closest(dropZoneSelector); + if (!dropElement && dropElementFromEvent?.isZenFolder) { + // If we're dragging over a folder, we want to show the indicator on the folder itself, not the label. + dropElementFromEvent = dropElementFromEvent.labelElement; + } dropElement = dropElementFromEvent || dropElement; if (!dropElementFromEvent) { let hoveringPeriphery = !!event.target.closest( diff --git a/src/zen/workspaces/ZenWorkspaces.mjs b/src/zen/workspaces/ZenWorkspaces.mjs index fbe5a4e9e..d66024bec 100644 --- a/src/zen/workspaces/ZenWorkspaces.mjs +++ b/src/zen/workspaces/ZenWorkspaces.mjs @@ -2072,14 +2072,10 @@ class nsZenWorkspaces { const essentialsContainer = this.getEssentialsSection( workspace.containerTabId ); - if ( - clonedEssentials[clonedEssentials.length - 1]?.contextId == - workspace.containerTabId - ) { - clonedEssentials[clonedEssentials.length - 1].repeat++; - clonedEssentials[clonedEssentials.length - 1].workspaces.push( - workspace - ); + let lastCloned = clonedEssentials[clonedEssentials.length - 1]; + if (lastCloned && lastCloned.contextId == workspace.containerTabId) { + lastCloned.repeat++; + lastCloned.workspaces.push(workspace); continue; } essentialsContainer.setAttribute("hidden", "true");