@vaadin/overlay 23.3.28 → 23.3.30

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": "23.3.28",
3
+ "version": "23.3.30",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -36,20 +36,20 @@
36
36
  "dependencies": {
37
37
  "@open-wc/dedupe-mixin": "^1.3.0",
38
38
  "@polymer/polymer": "^3.0.0",
39
- "@vaadin/component-base": "~23.3.28",
40
- "@vaadin/vaadin-lumo-styles": "~23.3.28",
41
- "@vaadin/vaadin-material-styles": "~23.3.28",
42
- "@vaadin/vaadin-themable-mixin": "~23.3.28"
39
+ "@vaadin/component-base": "~23.3.30",
40
+ "@vaadin/vaadin-lumo-styles": "~23.3.30",
41
+ "@vaadin/vaadin-material-styles": "~23.3.30",
42
+ "@vaadin/vaadin-themable-mixin": "~23.3.30"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@esm-bundle/chai": "^4.3.4",
46
46
  "@polymer/iron-overlay-behavior": "^3.0.0",
47
- "@vaadin/button": "~23.3.28",
48
- "@vaadin/radio-group": "~23.3.28",
47
+ "@vaadin/button": "~23.3.30",
48
+ "@vaadin/radio-group": "~23.3.30",
49
49
  "@vaadin/testing-helpers": "^0.3.2",
50
- "@vaadin/text-field": "~23.3.28",
50
+ "@vaadin/text-field": "~23.3.30",
51
51
  "lit": "^2.0.0",
52
52
  "sinon": "^13.0.2"
53
53
  },
54
- "gitHead": "060cd64f1a65c61904446c9725a8fe5d6c8f218c"
54
+ "gitHead": "53b2b27a0fc10b9fd008bc9112f5290221fbb184"
55
55
  }
@@ -11,7 +11,6 @@ import { isIOS } from '@vaadin/component-base/src/browser-utils.js';
11
11
  import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
12
12
  import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
13
13
  import { FocusTrapController } from '@vaadin/component-base/src/focus-trap-controller.js';
14
- import { getClosestFocusable } from '@vaadin/component-base/src/focus-utils.js';
15
14
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
16
15
 
17
16
  /**
@@ -376,11 +375,15 @@ class Overlay extends ThemableMixin(DirMixin(ControllerMixin(PolymerElement))) {
376
375
  this.addEventListener('click', () => {});
377
376
  this.$.backdrop.addEventListener('click', () => {});
378
377
 
379
- this.addController(this.__focusTrapController);
380
-
381
- this.addEventListener('mousedown', (e) => {
382
- this._onMouseDown(e);
378
+ this.addEventListener('mouseup', () => {
379
+ // In Chrome, focus moves to body on overlay content mousedown
380
+ // See https://github.com/vaadin/flow-components/issues/5507
381
+ if (document.activeElement === document.body && this.$.overlay.getAttribute('tabindex') === '0') {
382
+ this.$.overlay.focus();
383
+ }
383
384
  });
385
+
386
+ this.addController(this.__focusTrapController);
384
387
  }
385
388
 
386
389
  /** @private */
@@ -991,16 +994,6 @@ class Overlay extends ThemableMixin(DirMixin(ControllerMixin(PolymerElement))) {
991
994
  this.style.zIndex = zIndex;
992
995
  this.__zIndex = zIndex || parseFloat(getComputedStyle(this).zIndex);
993
996
  }
994
-
995
- /** @private */
996
- _onMouseDown(event) {
997
- const target = event.target;
998
- const focusable = getClosestFocusable(target.focusElement || target);
999
- if (focusable) {
1000
- event.preventDefault();
1001
- focusable.focus();
1002
- }
1003
- }
1004
997
  }
1005
998
 
1006
999
  customElements.define(Overlay.is, Overlay);