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:
parent
952c02d3d6
commit
a3bebadff8
3 changed files with 34 additions and 10 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue