mirror of
https://github.com/zen-browser/components.git
synced 2025-07-07 21:39:58 +02:00
Merge pull request #55 from HarryHeres/fix/macos-window-buttons-hover
Fixed MacOS window buttons hover in compact mode
This commit is contained in:
commit
a7eecc0d9c
1 changed files with 9 additions and 0 deletions
|
@ -187,6 +187,15 @@ var gZenCompactModeManager = {
|
|||
});
|
||||
|
||||
target.addEventListener('mouseleave', (event) => {
|
||||
// If on Mac, ignore mouseleave in the area of window buttons
|
||||
if (AppConstants.platform == 'macosx') {
|
||||
const MAC_WINDOW_BUTTONS_X_BORDER = 75;
|
||||
const MAC_WINDOW_BUTTONS_Y_BORDER = 40;
|
||||
if (event.clientX < MAC_WINDOW_BUTTONS_X_BORDER && event.clientY < MAC_WINDOW_BUTTONS_Y_BORDER) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.hoverableElements[i].keepHoverDuration) {
|
||||
this.flashElement(target, keepHoverDuration, 'has-hover' + target.id, 'zen-has-hover');
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue