@vaadin/overlay 24.2.4 → 24.2.6

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.2.4",
3
+ "version": "24.2.6",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -38,11 +38,11 @@
38
38
  "dependencies": {
39
39
  "@open-wc/dedupe-mixin": "^1.3.0",
40
40
  "@polymer/polymer": "^3.0.0",
41
- "@vaadin/a11y-base": "~24.2.4",
42
- "@vaadin/component-base": "~24.2.4",
43
- "@vaadin/vaadin-lumo-styles": "~24.2.4",
44
- "@vaadin/vaadin-material-styles": "~24.2.4",
45
- "@vaadin/vaadin-themable-mixin": "~24.2.4"
41
+ "@vaadin/a11y-base": "~24.2.6",
42
+ "@vaadin/component-base": "~24.2.6",
43
+ "@vaadin/vaadin-lumo-styles": "~24.2.6",
44
+ "@vaadin/vaadin-material-styles": "~24.2.6",
45
+ "@vaadin/vaadin-themable-mixin": "~24.2.6"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@esm-bundle/chai": "^4.3.4",
@@ -50,5 +50,5 @@
50
50
  "lit": "^2.0.0",
51
51
  "sinon": "^13.0.2"
52
52
  },
53
- "gitHead": "885416de13069b7409ac90c1b323a58ac87da6ce"
53
+ "gitHead": "0d105dd0eff818ab9c82c8443b92a1e15ac0e41a"
54
54
  }
@@ -4,7 +4,6 @@
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { afterNextRender } from '@polymer/polymer/lib/utils/render-status.js';
7
- import { getClosestFocusable } from '@vaadin/a11y-base/src/focus-utils.js';
8
7
  import { isIOS } from '@vaadin/component-base/src/browser-utils.js';
9
8
  import { OverlayFocusMixin } from './vaadin-overlay-focus-mixin.js';
10
9
  import { OverlayStackMixin } from './vaadin-overlay-stack-mixin.js';
@@ -120,8 +119,12 @@ export const OverlayMixin = (superClass) =>
120
119
  this.addEventListener('click', () => {});
121
120
  this.$.backdrop.addEventListener('click', () => {});
122
121
 
123
- this.addEventListener('mousedown', (e) => {
124
- this._onMouseDown(e);
122
+ this.addEventListener('mouseup', () => {
123
+ // In Chrome, focus moves to body on overlay content mousedown
124
+ // See https://github.com/vaadin/flow-components/issues/5507
125
+ if (document.activeElement === document.body && this.$.overlay.getAttribute('tabindex') === '0') {
126
+ this.$.overlay.focus();
127
+ }
125
128
  });
126
129
  }
127
130
 
@@ -474,14 +477,4 @@ export const OverlayMixin = (superClass) =>
474
477
  }
475
478
  }
476
479
  }
477
-
478
- /** @private */
479
- _onMouseDown(event) {
480
- const target = event.target;
481
- const focusable = getClosestFocusable(target.focusElement || target);
482
- if (focusable) {
483
- event.preventDefault();
484
- focusable.focus();
485
- }
486
- }
487
480
  };