mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-06 18:06:35 +00:00
fix: Improve event target checking for popup tracking elements
This commit is contained in:
@@ -49,7 +49,7 @@ var gZenUIManager = {
|
|||||||
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
|
||||||
// we also ignore menus inside panels
|
// we also ignore menus inside panels
|
||||||
if (!el.contains(showEvent.explicitOriginalTarget) || (showEvent.explicitOriginalTarget && showEvent.explicitOriginalTarget?.closest('panel'))) {
|
if (!el.contains(showEvent.explicitOriginalTarget) || (showEvent.explicitOriginalTarget instanceof Element && showEvent.explicitOriginalTarget?.closest('panel'))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
document.removeEventListener('mousemove', this.__removeHasPopupAttribute);
|
document.removeEventListener('mousemove', this.__removeHasPopupAttribute);
|
||||||
|
Reference in New Issue
Block a user