mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-03 08:28:38 +00:00
Enhance window button handling for macOS and update event listener references
This commit is contained in:
@@ -188,7 +188,16 @@ var gZenVerticalTabsManager = {
|
||||
get actualWindowButtons() {
|
||||
// we have multiple ".titlebar-buttonbox-container" in the DOM, because of the titlebar
|
||||
if (!this.__actualWindowButtons) {
|
||||
this.__actualWindowButtons = document.querySelector('#nav-bar .titlebar-buttonbox-container');
|
||||
if (window.AppConstants.platform !== 'macosx') {
|
||||
this.__actualWindowButtons = document.querySelector('#nav-bar .titlebar-buttonbox-container');
|
||||
} else {
|
||||
const buttons = document.querySelectorAll('.titlebar-buttonbox-container');
|
||||
if (buttons.length === 2) {
|
||||
this.__actualWindowButtons = buttons[1];
|
||||
} else {
|
||||
this.__actualWindowButtons = buttons[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
return this.__actualWindowButtons;
|
||||
},
|
||||
@@ -307,7 +316,7 @@ var gZenVerticalTabsManager = {
|
||||
if (isRightSide) {
|
||||
document.getElementById('zen-appcontent-navbar-container').prepend(windowButtons);
|
||||
} else {
|
||||
navBar.prepend(windowButtons);
|
||||
topButtons.prepend(windowButtons);
|
||||
}
|
||||
}
|
||||
} else if (!isSingleToolbar && isCompactMode) {
|
||||
|
Reference in New Issue
Block a user