@vaadin/overlay
Advanced tools
Comparing version 24.5.5 to 24.5.6
{ | ||
"name": "@vaadin/overlay", | ||
"version": "24.5.5", | ||
"version": "24.5.6", | ||
"publishConfig": { | ||
@@ -39,15 +39,15 @@ "access": "public" | ||
"@polymer/polymer": "^3.0.0", | ||
"@vaadin/a11y-base": "~24.5.5", | ||
"@vaadin/component-base": "~24.5.5", | ||
"@vaadin/vaadin-lumo-styles": "~24.5.5", | ||
"@vaadin/vaadin-material-styles": "~24.5.5", | ||
"@vaadin/vaadin-themable-mixin": "~24.5.5", | ||
"@vaadin/a11y-base": "~24.5.6", | ||
"@vaadin/component-base": "~24.5.6", | ||
"@vaadin/vaadin-lumo-styles": "~24.5.6", | ||
"@vaadin/vaadin-material-styles": "~24.5.6", | ||
"@vaadin/vaadin-themable-mixin": "~24.5.6", | ||
"lit": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"@vaadin/chai-plugins": "~24.5.5", | ||
"@vaadin/chai-plugins": "~24.5.6", | ||
"@vaadin/testing-helpers": "^1.0.0", | ||
"sinon": "^18.0.0" | ||
}, | ||
"gitHead": "864c93992c6466634ad47975dc6aceca3bbf8506" | ||
"gitHead": "2c20ec16149e8016e0733a80e349231da13660bc" | ||
} |
@@ -17,2 +17,9 @@ /** | ||
/** | ||
* Returns all attached overlay instances excluding notification container, | ||
* which only needs to be in the stack for zIndex but not pointer-events. | ||
* @private | ||
*/ | ||
const getOverlayInstances = () => getAttachedInstances().filter((el) => el.$.overlay); | ||
/** | ||
* Returns true if the overlay is the last one in the opened overlays stack. | ||
@@ -23,3 +30,3 @@ * @param {HTMLElement} overlay | ||
*/ | ||
export const isLastOverlay = (overlay) => overlay === getAttachedInstances().pop(); | ||
export const isLastOverlay = (overlay) => overlay === getOverlayInstances().pop(); | ||
@@ -73,4 +80,4 @@ /** | ||
// Disable pointer events in other attached overlays | ||
getAttachedInstances().forEach((el) => { | ||
if (el !== this && el.$.overlay) { | ||
getOverlayInstances().forEach((el) => { | ||
if (el !== this) { | ||
el.$.overlay.style.pointerEvents = 'none'; | ||
@@ -90,3 +97,3 @@ } | ||
// Restore pointer events in the previous overlay(s) | ||
const instances = getAttachedInstances(); | ||
const instances = getOverlayInstances(); | ||
@@ -100,5 +107,3 @@ let el; | ||
} | ||
if (el.$.overlay) { | ||
el.$.overlay.style.removeProperty('pointer-events'); | ||
} | ||
el.$.overlay.style.removeProperty('pointer-events'); | ||
if (!el.modeless) { | ||
@@ -105,0 +110,0 @@ // Stop after the last modal |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
74260
1655