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 and handle quitting application when closing glance
This commit is contained in:
parent
6d542ea79b
commit
9b4b399c59
1 changed files with 4 additions and 3 deletions
|
@ -173,6 +173,7 @@
|
|||
this.lastCurrentTab = this.#currentTab;
|
||||
|
||||
this.overlay.classList.remove("zen-glance-overlay");
|
||||
gBrowser._getSwitcher().setTabStateNoAction(this.lastCurrentTab, gBrowser.AsyncTabSwitcher.STATE_UNLOADED);
|
||||
|
||||
if (!onTabClose && gBrowser.selectedTab === this.lastCurrentTab) {
|
||||
this._duringOpening = true;
|
||||
|
@ -187,9 +188,9 @@
|
|||
|
||||
this.lastCurrentTab.removeAttribute("zen-glance-tab");
|
||||
|
||||
this.#currentTab.remove();
|
||||
this.#currentBrowser.destroy();
|
||||
this.#currentBrowser.closest(".browserSidebarContainer").remove();
|
||||
gBrowser.tabContainer._invalidateCachedTabs();
|
||||
gBrowser.removeTab(this.lastCurrentTab, { animate: false });
|
||||
|
||||
this.#currentTab = null;
|
||||
this.#currentBrowser = null;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue