mirror of
https://github.com/zen-browser/desktop.git
synced 2025-12-21 22:05:32 +00:00
fix: Fixed split view splitters showing up when opening glance, b=closes #11641, c=split-view
This commit is contained in:
@@ -1021,14 +1021,20 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature {
|
||||
let tab = window.gBrowser.getTabForBrowser(browser);
|
||||
const ignoreSplit = tab.hasAttribute('zen-dont-split-glance');
|
||||
tab.removeAttribute('zen-dont-split-glance');
|
||||
let isGlanceTab = false;
|
||||
if (tab.hasAttribute('zen-glance-tab') && !ignoreSplit) {
|
||||
// Extract from parent node so we are not selecting the wrong (current) tab
|
||||
tab = tab.parentNode.closest('.tabbrowser-tab');
|
||||
isGlanceTab = true;
|
||||
console.assert(tab, 'Tab not found for zen-glance-tab');
|
||||
}
|
||||
if (tab) {
|
||||
this.updateSplitView(tab);
|
||||
tab.linkedBrowser.docShellIsActive = true;
|
||||
if (isGlanceTab) {
|
||||
// See issues https://github.com/zen-browser/desktop/issues/11641
|
||||
this.removeSplitters();
|
||||
}
|
||||
}
|
||||
this._maybeRemoveFakeBrowser();
|
||||
{
|
||||
@@ -1168,7 +1174,6 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature {
|
||||
const oldView = this.currentView;
|
||||
const newView = this._data.findIndex((group) => group.tabs.includes(tab));
|
||||
|
||||
if (oldView === newView) return;
|
||||
if (newView < 0 && oldView >= 0) {
|
||||
this.deactivateCurrentSplitView();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user