mirror of
https://github.com/zen-browser/desktop.git
synced 2026-03-29 03:41:51 +00:00
feat: Make sure to add checks for invalid essential items, b=no-bug, c=workspaces
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user