1
0
Fork 1
mirror of https://github.com/zen-browser/desktop.git synced 2025-07-10 15:55:30 +02:00

Fixed crash on overflow menu in macos and fixed elements shifting on macos fullscreen

This commit is contained in:
mr. M 2025-01-24 17:41:03 +01:00
parent 952c02d3d6
commit a3bebadff8
No known key found for this signature in database
GPG key ID: CBD57A2AEDBDA1FB
3 changed files with 34 additions and 10 deletions

View file

@ -11,7 +11,6 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
cumulativeDelta: 0,
direction: null,
};
_hoveringSidebar = false;
_lastScrollTime = 0;
bookmarkMenus = [
'PlacesToolbar',
@ -114,6 +113,10 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
window.addEventListener('AppCommand', HandleAppCommandEvent, true);
}
get _hoveringSidebar() {
return document.getElementById('navigator-toolbox').hasAttribute('zen-has-hover');
}
_handleAppCommand(event) {
if (!this.workspaceEnabled || !this._hoveringSidebar) {
return;
@ -138,14 +141,6 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
_setupSidebarHandlers() {
const toolbox = document.getElementById('navigator-toolbox');
toolbox.addEventListener('mouseenter', () => {
this._hoveringSidebar = true;
});
toolbox.addEventListener('mouseleave', () => {
this._hoveringSidebar = false;
});
const scrollCooldown = 200; // Milliseconds to wait before allowing another scroll
const scrollThreshold = 2; // Minimum scroll delta to trigger workspace change