mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-05 19:08:18 +00:00
Fix toolbar not hiding after minimizing
This commit is contained in:
@@ -37,6 +37,9 @@ var gZenCompactModeManager = {
|
||||
|
||||
this.addMouseActions();
|
||||
this.addContextMenu();
|
||||
|
||||
// Clear hover states when window state changes (minimize, maximize, etc.)
|
||||
window.addEventListener("sizemodechange", () => this._clearAllHoverStates());
|
||||
},
|
||||
|
||||
get preference() {
|
||||
@@ -450,4 +453,15 @@ var gZenCompactModeManager = {
|
||||
let toolbar = document.getElementById('zen-appcontent-navbar-container');
|
||||
toolbar.toggleAttribute('zen-user-show');
|
||||
},
|
||||
|
||||
_clearAllHoverStates() {
|
||||
// Clear hover attributes from all hoverable elements
|
||||
for (let entry of this.hoverableElements) {
|
||||
const target = entry.element;
|
||||
if (target) {
|
||||
target.removeAttribute('zen-has-hover');
|
||||
this.clearFlashTimeout('has-hover' + target.id);
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
Reference in New Issue
Block a user