@vaadin/overlay 24.2.3 → 24.2.4
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 +7 -7
- package/src/vaadin-overlay-mixin.js +15 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/overlay",
|
|
3
|
-
"version": "24.2.
|
|
3
|
+
"version": "24.2.4",
|
|
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.
|
|
42
|
-
"@vaadin/component-base": "~24.2.
|
|
43
|
-
"@vaadin/vaadin-lumo-styles": "~24.2.
|
|
44
|
-
"@vaadin/vaadin-material-styles": "~24.2.
|
|
45
|
-
"@vaadin/vaadin-themable-mixin": "~24.2.
|
|
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"
|
|
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": "
|
|
53
|
+
"gitHead": "885416de13069b7409ac90c1b323a58ac87da6ce"
|
|
54
54
|
}
|
|
@@ -4,6 +4,7 @@
|
|
|
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';
|
|
7
8
|
import { isIOS } from '@vaadin/component-base/src/browser-utils.js';
|
|
8
9
|
import { OverlayFocusMixin } from './vaadin-overlay-focus-mixin.js';
|
|
9
10
|
import { OverlayStackMixin } from './vaadin-overlay-stack-mixin.js';
|
|
@@ -118,6 +119,10 @@ export const OverlayMixin = (superClass) =>
|
|
|
118
119
|
// and <vaadin-context-menu>).
|
|
119
120
|
this.addEventListener('click', () => {});
|
|
120
121
|
this.$.backdrop.addEventListener('click', () => {});
|
|
122
|
+
|
|
123
|
+
this.addEventListener('mousedown', (e) => {
|
|
124
|
+
this._onMouseDown(e);
|
|
125
|
+
});
|
|
121
126
|
}
|
|
122
127
|
|
|
123
128
|
/** @protected */
|
|
@@ -469,4 +474,14 @@ export const OverlayMixin = (superClass) =>
|
|
|
469
474
|
}
|
|
470
475
|
}
|
|
471
476
|
}
|
|
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
|
+
}
|
|
472
487
|
};
|