Fixed compact mode sidebar breaking when open a link from the other subpanels (https://github.com/zen-browser/desktop/issues/2218)

This commit is contained in:
mr. M
2024-10-31 16:08:15 +01:00
parent cfd2e57950
commit 440b7171b0

View File

@@ -48,7 +48,8 @@ var gZenUIManager = {
onPopupShowing(showEvent) { onPopupShowing(showEvent) {
for (const el of this._popupTrackingElements) { for (const el of this._popupTrackingElements) {
// target may be inside a shadow root, not directly under the element // target may be inside a shadow root, not directly under the element
if (!el.contains(showEvent.explicitOriginalTarget)) { // we also ignore menus inside panels
if (!el.contains(showEvent.explicitOriginalTarget) || showEvent.explicitOriginalTarget.closest('panel')) {
continue; continue;
} }
document.removeEventListener('mousemove', this.__removeHasPopupAttribute); document.removeEventListener('mousemove', this.__removeHasPopupAttribute);