Skip to content

Commit

Permalink
Fix sidebar still hiding because of tab-preview-panel close event
Browse files Browse the repository at this point in the history
  • Loading branch information
BrhmDev committed Sep 18, 2024
1 parent afb2290 commit 2d8f8be
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/browser/base/content/ZenUIManager.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,15 @@ var gZenCompactModeManager = {
addEventListener('mousemove', this.__removeHasPopupAttribute, {once: true});
}
}
const removeHasPopupOnPopupHidden = () => {
removeEventListener('click', waitForMouseMoveOnPopupSelect);
this.__removeHasPopupAttribute();
const removeHasPopupOnPopupHidden = (event) => {
if (['toolbar-context-menu', 'tabContextMenu'].includes(event.target.id)) {
removeEventListener('click', waitForMouseMoveOnPopupSelect);
removeEventListener('popuphidden', removeHasPopupOnPopupHidden);
this.__removeHasPopupAttribute();
}
}
addEventListener('click', waitForMouseMoveOnPopupSelect);
addEventListener('popuphidden', removeHasPopupOnPopupHidden, {once: true});
addEventListener('popuphidden', removeHasPopupOnPopupHidden);
},

toggleToolbar() {
Expand Down

0 comments on commit 2d8f8be

Please sign in to comment.