@vaadin/dialog 25.1.7 → 25.1.9

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/dialog",
3
- "version": "25.1.7",
3
+ "version": "25.1.9",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -37,19 +37,19 @@
37
37
  ],
38
38
  "dependencies": {
39
39
  "@open-wc/dedupe-mixin": "^1.3.0",
40
- "@vaadin/component-base": "~25.1.7",
41
- "@vaadin/lit-renderer": "~25.1.7",
42
- "@vaadin/overlay": "~25.1.7",
43
- "@vaadin/vaadin-themable-mixin": "~25.1.7",
40
+ "@vaadin/component-base": "~25.1.9",
41
+ "@vaadin/lit-renderer": "~25.1.9",
42
+ "@vaadin/overlay": "~25.1.9",
43
+ "@vaadin/vaadin-themable-mixin": "~25.1.9",
44
44
  "lit": "^3.0.0"
45
45
  },
46
46
  "devDependencies": {
47
- "@vaadin/a11y-base": "~25.1.7",
48
- "@vaadin/aura": "~25.1.7",
49
- "@vaadin/chai-plugins": "~25.1.7",
50
- "@vaadin/test-runner-commands": "~25.1.7",
47
+ "@vaadin/a11y-base": "~25.1.9",
48
+ "@vaadin/aura": "~25.1.9",
49
+ "@vaadin/chai-plugins": "~25.1.9",
50
+ "@vaadin/test-runner-commands": "~25.1.9",
51
51
  "@vaadin/testing-helpers": "^2.0.0",
52
- "@vaadin/vaadin-lumo-styles": "~25.1.7",
52
+ "@vaadin/vaadin-lumo-styles": "~25.1.9",
53
53
  "sinon": "^21.0.2"
54
54
  },
55
55
  "customElements": "custom-elements.json",
@@ -57,5 +57,5 @@
57
57
  "web-types.json",
58
58
  "web-types.lit.json"
59
59
  ],
60
- "gitHead": "9872e9dc95ced20136b2f5373760d8e47bf9d44b"
60
+ "gitHead": "4bf167ae31ef09b037ca0a56d2a1886d1eeb0ba8"
61
61
  }
@@ -201,10 +201,11 @@ export const DialogBaseMixin = (superClass) =>
201
201
  }
202
202
 
203
203
  /** @private */
204
- _bringOverlayToFront() {
205
- if (this.modeless) {
206
- this._overlayElement.bringToFront();
204
+ _bringOverlayToFront(event) {
205
+ if (!this.modeless) {
206
+ return;
207
207
  }
208
+ this._overlayElement.bringToFront(event);
208
209
  }
209
210
 
210
211
  /** @private */
@@ -7,6 +7,7 @@ import { html, LitElement } from 'lit';
7
7
  import { defineCustomElement } from '@vaadin/component-base/src/define.js';
8
8
  import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
9
9
  import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
10
+ import { getOverlaysOnTop, isNestedOverlay } from '@vaadin/overlay/src/vaadin-overlay-stack-mixin.js';
10
11
  import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
11
12
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
12
13
  import { dialogOverlayStyles } from './styles/vaadin-dialog-overlay-base-styles.js';
@@ -58,6 +59,29 @@ export class DialogOverlay extends DialogOverlayMixin(
58
59
  </div>
59
60
  `;
60
61
  }
62
+
63
+ /**
64
+ * @param {Event} event
65
+ * @protected
66
+ * @override
67
+ */
68
+ bringToFront(event) {
69
+ if (event instanceof Event) {
70
+ const path = event.composedPath();
71
+
72
+ // Do not bring overlay to front if this method is called
73
+ // on event that originates from a nested dialog content.
74
+ const isNestedDialogEvent = getOverlaysOnTop(this).some(
75
+ (overlay) => path.includes(overlay) && isNestedOverlay(this, overlay) && overlay instanceof DialogOverlay,
76
+ );
77
+
78
+ if (isNestedDialogEvent) {
79
+ return;
80
+ }
81
+ }
82
+
83
+ super.bringToFront();
84
+ }
61
85
  }
62
86
 
63
87
  defineCustomElement(DialogOverlay);
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/dialog",
4
- "version": "25.1.7",
4
+ "version": "25.1.9",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/dialog",
4
- "version": "25.1.7",
4
+ "version": "25.1.9",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {