@vaadin/overlay 24.9.6 → 24.9.8

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/overlay",
3
- "version": "24.9.6",
3
+ "version": "24.9.8",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -36,18 +36,18 @@
36
36
  "dependencies": {
37
37
  "@open-wc/dedupe-mixin": "^1.3.0",
38
38
  "@polymer/polymer": "^3.0.0",
39
- "@vaadin/a11y-base": "~24.9.6",
40
- "@vaadin/component-base": "~24.9.6",
41
- "@vaadin/vaadin-lumo-styles": "~24.9.6",
42
- "@vaadin/vaadin-material-styles": "~24.9.6",
43
- "@vaadin/vaadin-themable-mixin": "~24.9.6",
39
+ "@vaadin/a11y-base": "~24.9.8",
40
+ "@vaadin/component-base": "~24.9.8",
41
+ "@vaadin/vaadin-lumo-styles": "~24.9.8",
42
+ "@vaadin/vaadin-material-styles": "~24.9.8",
43
+ "@vaadin/vaadin-themable-mixin": "~24.9.8",
44
44
  "lit": "^3.0.0"
45
45
  },
46
46
  "devDependencies": {
47
- "@vaadin/chai-plugins": "~24.9.6",
48
- "@vaadin/test-runner-commands": "~24.9.6",
47
+ "@vaadin/chai-plugins": "~24.9.8",
48
+ "@vaadin/test-runner-commands": "~24.9.8",
49
49
  "@vaadin/testing-helpers": "^1.1.0",
50
50
  "sinon": "^18.0.0"
51
51
  },
52
- "gitHead": "04dec563d48efd4e5ca0c0b96687302666ee5ab1"
52
+ "gitHead": "deee84906a0b74bac20b2f3ca0aa7fe02e700e23"
53
53
  }
@@ -13,6 +13,25 @@ const getAttachedInstances = () =>
13
13
  .filter((el) => el instanceof HTMLElement && el._hasOverlayStackMixin && !el.hasAttribute('closing'))
14
14
  .sort((a, b) => a.__zIndex - b.__zIndex || 0);
15
15
 
16
+ /**
17
+ * Returns true if all the instances on top of the overlay are nested overlays.
18
+ * @private
19
+ */
20
+ export const hasOnlyNestedOverlays = (overlay) => {
21
+ const instances = getAttachedInstances();
22
+ const next = instances[instances.indexOf(overlay) + 1];
23
+ if (!next) {
24
+ return true;
25
+ }
26
+
27
+ // Check if the overlay contains the owner element of another overlay
28
+ if (next.owner && !overlay._deepContains(next.owner)) {
29
+ return false;
30
+ }
31
+
32
+ return hasOnlyNestedOverlays(next);
33
+ };
34
+
16
35
  /**
17
36
  * Returns all attached overlay instances excluding notification container,
18
37
  * which only needs to be in the stack for zIndex but not pointer-events.