@naniteninja/dashboard-components-lib 2.1.43 → 2.1.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6526,35 +6526,8 @@ class LibDashboardSwipeableTabsComponent {
|
|
|
6526
6526
|
detectExternalOverlayVisible() {
|
|
6527
6527
|
if (typeof document === 'undefined')
|
|
6528
6528
|
return false;
|
|
6529
|
-
const selectors = [
|
|
6530
|
-
'ion-modal:not(.overlay-hidden)',
|
|
6531
|
-
'ion-alert:not(.overlay-hidden)',
|
|
6532
|
-
'ion-loading:not(.overlay-hidden)',
|
|
6533
|
-
'ion-action-sheet:not(.overlay-hidden)',
|
|
6534
|
-
'ion-popover:not(.overlay-hidden)',
|
|
6535
|
-
'.cdk-overlay-backdrop.cdk-overlay-backdrop-showing',
|
|
6536
|
-
'.p-dialog-mask',
|
|
6537
|
-
'.pref-match-manager-backdrop',
|
|
6538
|
-
'.confirm-dialog-overlay',
|
|
6539
|
-
];
|
|
6540
|
-
for (const s of selectors) {
|
|
6541
|
-
const nodes = document.body.querySelectorAll(s);
|
|
6542
|
-
if (this.anyVisible(nodes))
|
|
6543
|
-
return true;
|
|
6544
|
-
}
|
|
6545
|
-
if (this.anyVisible(document.body.querySelectorAll('[aria-modal="true"]')))
|
|
6546
|
-
return true;
|
|
6547
|
-
if (this.anyVisible(document.body.querySelectorAll('[role="dialog"]')))
|
|
6548
|
-
return true;
|
|
6549
6529
|
return this.isSettingsTriggerOccludedByOverlay();
|
|
6550
6530
|
}
|
|
6551
|
-
anyVisible(nodes) {
|
|
6552
|
-
for (const el of Array.from(nodes)) {
|
|
6553
|
-
if (this.isElementVisible(el))
|
|
6554
|
-
return true;
|
|
6555
|
-
}
|
|
6556
|
-
return false;
|
|
6557
|
-
}
|
|
6558
6531
|
isElementVisible(el) {
|
|
6559
6532
|
const style = getComputedStyle(el);
|
|
6560
6533
|
if (style.display === 'none')
|
|
@@ -6588,7 +6561,8 @@ class LibDashboardSwipeableTabsComponent {
|
|
|
6588
6561
|
portalEl.style.pointerEvents = prevPointerEvents;
|
|
6589
6562
|
if (!el)
|
|
6590
6563
|
return false;
|
|
6591
|
-
|
|
6564
|
+
// If we hit our own or related component tree, it's not occlusion
|
|
6565
|
+
if (el.closest('.settings-trigger-wrapper-portal, .settings-trigger-wrapper, .global-menu, .tab-bar-container, lib-client-home, lib-matcher-viewport, lib-client-viewport'))
|
|
6592
6566
|
return false;
|
|
6593
6567
|
const explicitOverlay = el.closest('ion-modal, ion-alert, ion-loading, ion-action-sheet, ion-popover, .cdk-overlay-container, .cdk-overlay-backdrop, .p-dialog-mask, .pref-match-manager-backdrop, [aria-modal="true"], [role="dialog"]');
|
|
6594
6568
|
if (explicitOverlay)
|
|
@@ -6599,8 +6573,9 @@ class LibDashboardSwipeableTabsComponent {
|
|
|
6599
6573
|
if (st.position === 'fixed') {
|
|
6600
6574
|
const rr = cur.getBoundingClientRect();
|
|
6601
6575
|
const z = Number.parseInt(st.zIndex || '0', 10);
|
|
6576
|
+
// Only consider it blocking if it covers a large part of the screen AND has a z-index high enough to actually cover our portal (300)
|
|
6602
6577
|
const covers = rr.width >= window.innerWidth * 0.7 && rr.height >= window.innerHeight * 0.35;
|
|
6603
|
-
if (covers && Number.isFinite(z) && z >=
|
|
6578
|
+
if (covers && Number.isFinite(z) && z >= 300)
|
|
6604
6579
|
return true;
|
|
6605
6580
|
}
|
|
6606
6581
|
cur = cur.parentElement;
|