mirror of
https://github.com/zen-browser/components.git
synced 2025-07-07 16:45:31 +02:00
Refactor ZenGlanceManager.mjs to simplify closing of glance by removing unnecessary animation option
This commit is contained in:
parent
208e147264
commit
6d542ea79b
1 changed files with 11 additions and 10 deletions
|
@ -153,6 +153,7 @@
|
||||||
|
|
||||||
// do NOT touch here, I don't know what it does, but it works...
|
// do NOT touch here, I don't know what it does, but it works...
|
||||||
window.requestAnimationFrame(() => {
|
window.requestAnimationFrame(() => {
|
||||||
|
this.#currentTab.style.display = "none";
|
||||||
this.browserWrapper.removeAttribute("animate");
|
this.browserWrapper.removeAttribute("animate");
|
||||||
this.browserWrapper.removeAttribute("animate-end");
|
this.browserWrapper.removeAttribute("animate-end");
|
||||||
this.overlay.setAttribute("fade-out", true);
|
this.overlay.setAttribute("fade-out", true);
|
||||||
|
@ -169,11 +170,7 @@
|
||||||
this.overlay.removeAttribute("fade-out");
|
this.overlay.removeAttribute("fade-out");
|
||||||
this.browserWrapper.removeAttribute("animate");
|
this.browserWrapper.removeAttribute("animate");
|
||||||
|
|
||||||
this.#currentTab.style.display = "none";
|
|
||||||
|
|
||||||
this.#currentBrowser = null;
|
|
||||||
this.lastCurrentTab = this.#currentTab;
|
this.lastCurrentTab = this.#currentTab;
|
||||||
this.#currentTab = null;
|
|
||||||
|
|
||||||
this.overlay.classList.remove("zen-glance-overlay");
|
this.overlay.classList.remove("zen-glance-overlay");
|
||||||
|
|
||||||
|
@ -188,12 +185,16 @@
|
||||||
this.overlay = null;
|
this.overlay = null;
|
||||||
this.contentWrapper = null;
|
this.contentWrapper = null;
|
||||||
|
|
||||||
setTimeout(() => {
|
this.lastCurrentTab.removeAttribute("zen-glance-tab");
|
||||||
this.lastCurrentTab.removeAttribute("zen-glance-tab");
|
|
||||||
gBrowser.removeTab(this.lastCurrentTab);
|
this.#currentTab.remove();
|
||||||
this.lastCurrentTab = null;
|
this.#currentBrowser.destroy();
|
||||||
this._duringOpening = false;
|
this.#currentBrowser.closest(".browserSidebarContainer").remove();
|
||||||
}, 100);
|
this.#currentTab = null;
|
||||||
|
this.#currentBrowser = null;
|
||||||
|
|
||||||
|
this.lastCurrentTab = null;
|
||||||
|
this._duringOpening = false;
|
||||||
}, 500);
|
}, 500);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue