mirror of
https://github.com/zen-browser/desktop.git
synced 2026-04-02 05:39:18 +00:00
Merge branch 'dev' of https://github.com/zen-browser/desktop into dev
This commit is contained in:
@@ -86,6 +86,13 @@
|
||||
);
|
||||
};
|
||||
|
||||
this.scrollbox._canScrollToElement = (element) => {
|
||||
if (gBrowser.isTab(element)) {
|
||||
return !element.hasAttribute('zen-essential') || !this.hasAttribute('positionpinnedtabs');
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
// Override for performance reasons. This is the size of a single element
|
||||
// that can be scrolled when using mouse wheel scrolling. If we don't do
|
||||
// this then arrowscrollbox computes this value by calling
|
||||
@@ -95,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.
|
||||
|
||||
@@ -808,13 +808,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 {
|
||||
@@ -831,6 +824,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