mirror of
https://github.com/zen-browser/desktop.git
synced 2026-07-18 06:31:04 +00:00
feat: Make sure to always clear dragging-out flag on each new drag event, b=no-bug, c=tabs
This commit is contained in:
@@ -105,6 +105,7 @@
|
||||
|
||||
startTabDrag(event, tab, ...args) {
|
||||
this.ZenDragAndDropService.onDragStart(1);
|
||||
this.#isOutOfWindow = false;
|
||||
gZenCompactModeManager._isTabBeingDragged = true;
|
||||
super.startTabDrag(event, tab, ...args);
|
||||
const dt = event.dataTransfer;
|
||||
@@ -861,6 +862,7 @@
|
||||
const draggedTab = dt.mozGetDataAt(TAB_DROP_TYPE, 0);
|
||||
let ownerGlobal = draggedTab?.ownerGlobal;
|
||||
draggedTab.style.visibility = "";
|
||||
let thisFromGlobal = ownerGlobal?.gBrowser.tabContainer.tabDragAndDrop;
|
||||
let currentEssenialContainer = ownerGlobal.gZenWorkspaces.getCurrentEssentialsContainer();
|
||||
if (currentEssenialContainer?.essentialsPromo) {
|
||||
currentEssenialContainer.essentialsPromo.remove();
|
||||
@@ -870,19 +872,21 @@
|
||||
ownerGlobal.gZenFolders.highlightGroupOnDragOver(null);
|
||||
this.ZenDragAndDropService.onDragEnd();
|
||||
super.handle_dragend(event);
|
||||
this.#removeDragOverBackground();
|
||||
thisFromGlobal.clearDragOverVisuals();
|
||||
ownerGlobal.gZenPinnedTabManager.removeTabContainersDragoverClass();
|
||||
this.#maybeClearVerticalPinnedGridDragOver();
|
||||
this.originalDragImageArgs = [];
|
||||
window.removeEventListener("dragenter", this.handle_windowDragEnter, { capture: true });
|
||||
thisFromGlobal.originalDragImageArgs = [];
|
||||
window.removeEventListener("dragenter", thisFromGlobal.handle_windowDragEnter, {
|
||||
capture: true,
|
||||
});
|
||||
this.#isOutOfWindow = false;
|
||||
if (this._browserDragImageWrapper) {
|
||||
this._browserDragImageWrapper.remove();
|
||||
delete this._browserDragImageWrapper;
|
||||
if (thisFromGlobal._browserDragImageWrapper) {
|
||||
thisFromGlobal._browserDragImageWrapper.remove();
|
||||
delete thisFromGlobal._browserDragImageWrapper;
|
||||
}
|
||||
if (this._tempDragImageParent) {
|
||||
this._tempDragImageParent.remove();
|
||||
delete this._tempDragImageParent;
|
||||
if (thisFromGlobal._tempDragImageParent) {
|
||||
thisFromGlobal._tempDragImageParent.remove();
|
||||
delete thisFromGlobal._tempDragImageParent;
|
||||
}
|
||||
delete ownerGlobal.gZenCompactModeManager._isTabBeingDragged;
|
||||
if (dt.dropEffect !== "move") {
|
||||
|
||||
@@ -600,6 +600,9 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature {
|
||||
if (tab) {
|
||||
++newIndex;
|
||||
}
|
||||
if (workspaceId) {
|
||||
tab.setAttribute("zen-workspace-id", workspaceId);
|
||||
}
|
||||
}
|
||||
return tab;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user