@vaadin/popover 24.5.0-alpha3 → 24.5.0-alpha4

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/popover",
3
- "version": "24.5.0-alpha3",
3
+ "version": "24.5.0-alpha4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -35,12 +35,12 @@
35
35
  ],
36
36
  "dependencies": {
37
37
  "@open-wc/dedupe-mixin": "^1.3.0",
38
- "@vaadin/a11y-base": "24.5.0-alpha3",
39
- "@vaadin/component-base": "24.5.0-alpha3",
40
- "@vaadin/overlay": "24.5.0-alpha3",
41
- "@vaadin/vaadin-lumo-styles": "24.5.0-alpha3",
42
- "@vaadin/vaadin-material-styles": "24.5.0-alpha3",
43
- "@vaadin/vaadin-themable-mixin": "24.5.0-alpha3",
38
+ "@vaadin/a11y-base": "24.5.0-alpha4",
39
+ "@vaadin/component-base": "24.5.0-alpha4",
40
+ "@vaadin/overlay": "24.5.0-alpha4",
41
+ "@vaadin/vaadin-lumo-styles": "24.5.0-alpha4",
42
+ "@vaadin/vaadin-material-styles": "24.5.0-alpha4",
43
+ "@vaadin/vaadin-themable-mixin": "24.5.0-alpha4",
44
44
  "lit": "^3.0.0"
45
45
  },
46
46
  "devDependencies": {
@@ -52,5 +52,5 @@
52
52
  "web-types.json",
53
53
  "web-types.lit.json"
54
54
  ],
55
- "gitHead": "9ccd96c77a1568e625fa44f6809e765c0ba91403"
55
+ "gitHead": "a2cd3079183a097b793073eeffd3bd59dec2b664"
56
56
  }
@@ -12,6 +12,7 @@ import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
12
12
  import { OverlayClassMixin } from '@vaadin/component-base/src/overlay-class-mixin.js';
13
13
  import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
14
14
  import { generateUniqueId } from '@vaadin/component-base/src/unique-id-utils.js';
15
+ import { isLastOverlay } from '@vaadin/overlay/src/vaadin-overlay-stack-mixin.js';
15
16
  import { ThemePropertyMixin } from '@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js';
16
17
  import { PopoverPositionMixin } from './vaadin-popover-position-mixin.js';
17
18
  import { PopoverTargetMixin } from './vaadin-popover-target-mixin.js';
@@ -500,7 +501,8 @@ class Popover extends PopoverPositionMixin(
500
501
  !this.__isManual &&
501
502
  !this.modal &&
502
503
  !event.composedPath().some((el) => el === this._overlayElement || el === this.target) &&
503
- !this.noCloseOnOutsideClick
504
+ !this.noCloseOnOutsideClick &&
505
+ isLastOverlay(this._overlayElement)
504
506
  ) {
505
507
  this._openedStateController.close(true);
506
508
  }
@@ -526,7 +528,14 @@ class Popover extends PopoverPositionMixin(
526
528
  * @private
527
529
  */
528
530
  __onGlobalKeyDown(event) {
529
- if (event.key === 'Escape' && !this.modal && !this.noCloseOnEsc && this.opened && !this.__isManual) {
531
+ if (
532
+ event.key === 'Escape' &&
533
+ !this.modal &&
534
+ !this.noCloseOnEsc &&
535
+ this.opened &&
536
+ !this.__isManual &&
537
+ isLastOverlay(this._overlayElement)
538
+ ) {
530
539
  // Prevent closing parent overlay (e.g. dialog)
531
540
  event.stopPropagation();
532
541
  this._openedStateController.close(true);
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/popover",
4
- "version": "24.5.0-alpha3",
4
+ "version": "24.5.0-alpha4",
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/popover",
4
- "version": "24.5.0-alpha3",
4
+ "version": "24.5.0-alpha4",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {