mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-18 07:41:59 +00:00
fix: refine mouse event handling for macOS window buttons to improve hover state accuracy
This commit is contained in:
@@ -41,10 +41,13 @@ var gZenCompactModeManager = {
|
|||||||
// Clear hover states when window state changes (minimize, maximize, etc.)
|
// Clear hover states when window state changes (minimize, maximize, etc.)
|
||||||
window.addEventListener('sizemodechange', () => this._clearAllHoverStates());
|
window.addEventListener('sizemodechange', () => this._clearAllHoverStates());
|
||||||
|
|
||||||
window.addEventListener('mouseover', () => {
|
if (AppConstants.platform == 'macosx') {
|
||||||
|
window.addEventListener('mouseover', (event) => {
|
||||||
const buttons = gZenVerticalTabsManager.actualWindowButtons;
|
const buttons = gZenVerticalTabsManager.actualWindowButtons;
|
||||||
|
if (event.target.closest('.titlebar-buttonbox-container') === buttons) return;
|
||||||
buttons.removeAttribute('zen-has-hover');
|
buttons.removeAttribute('zen-has-hover');
|
||||||
});
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
get preference() {
|
get preference() {
|
||||||
|
Reference in New Issue
Block a user