mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-05 19:08:18 +00:00
fix: Fixed resizing workspaces at startup, b=(no-bug), c=workspaces
This commit is contained in:
@@ -102,9 +102,13 @@
|
||||
// height. For tab group labels, the number won't exactly match, but
|
||||
// that shouldn't be a problem in practice since the arrowscrollbox
|
||||
// stops at element bounds when finishing scrolling.
|
||||
Object.defineProperty(this.scrollbox, 'lineScrollAmount', {
|
||||
get: () => 36,
|
||||
});
|
||||
try {
|
||||
Object.defineProperty(this.scrollbox, 'lineScrollAmount', {
|
||||
get: () => 36,
|
||||
});
|
||||
} catch (e) {
|
||||
console.warn('Failed to set lineScrollAmount', e);
|
||||
}
|
||||
|
||||
// Add them manually since attribute inheritance doesn't work
|
||||
// for multiple layers of shadow DOM.
|
||||
|
@@ -809,13 +809,6 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
this._initializeWorkspaceTabContextMenus();
|
||||
await this.workspaceBookmarks();
|
||||
window.addEventListener('TabBrowserInserted', this.onTabBrowserInserted.bind(this));
|
||||
const tabUpdateListener = this.updateTabsContainers.bind(this);
|
||||
window.addEventListener('TabOpen', tabUpdateListener);
|
||||
window.addEventListener('TabClose', tabUpdateListener);
|
||||
window.addEventListener('TabAddedToEssentials', tabUpdateListener);
|
||||
window.addEventListener('TabRemovedFromEssentials', tabUpdateListener);
|
||||
window.addEventListener('TabPinned', tabUpdateListener);
|
||||
window.addEventListener('TabUnpinned', tabUpdateListener);
|
||||
let activeWorkspace = await this.getActiveWorkspace();
|
||||
this.activeWorkspace = activeWorkspace?.uuid;
|
||||
try {
|
||||
@@ -832,6 +825,14 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
this._fixTabPositions();
|
||||
this._resolveInitialized();
|
||||
this._clearAnyZombieTabs(); // Dont call with await
|
||||
|
||||
const tabUpdateListener = this.updateTabsContainers.bind(this);
|
||||
window.addEventListener('TabOpen', tabUpdateListener);
|
||||
window.addEventListener('TabClose', tabUpdateListener);
|
||||
window.addEventListener('TabAddedToEssentials', tabUpdateListener);
|
||||
window.addEventListener('TabRemovedFromEssentials', tabUpdateListener);
|
||||
window.addEventListener('TabPinned', tabUpdateListener);
|
||||
window.addEventListener('TabUnpinned', tabUpdateListener);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user