@vaadin/popover 25.3.0-alpha9 → 25.3.0-beta2
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 +11 -11
- package/src/vaadin-popover-focus-controller.js +17 -0
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/popover",
|
|
3
|
-
"version": "25.3.0-
|
|
3
|
+
"version": "25.3.0-beta2",
|
|
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/a11y-base": "25.3.0-
|
|
41
|
-
"@vaadin/component-base": "25.3.0-
|
|
42
|
-
"@vaadin/lit-renderer": "25.3.0-
|
|
43
|
-
"@vaadin/overlay": "25.3.0-
|
|
44
|
-
"@vaadin/vaadin-themable-mixin": "25.3.0-
|
|
40
|
+
"@vaadin/a11y-base": "25.3.0-beta2",
|
|
41
|
+
"@vaadin/component-base": "25.3.0-beta2",
|
|
42
|
+
"@vaadin/lit-renderer": "25.3.0-beta2",
|
|
43
|
+
"@vaadin/overlay": "25.3.0-beta2",
|
|
44
|
+
"@vaadin/vaadin-themable-mixin": "25.3.0-beta2",
|
|
45
45
|
"lit": "^3.0.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@vaadin/aura": "25.3.0-
|
|
49
|
-
"@vaadin/chai-plugins": "25.3.0-
|
|
50
|
-
"@vaadin/test-runner-commands": "25.3.0-
|
|
48
|
+
"@vaadin/aura": "25.3.0-beta2",
|
|
49
|
+
"@vaadin/chai-plugins": "25.3.0-beta2",
|
|
50
|
+
"@vaadin/test-runner-commands": "25.3.0-beta2",
|
|
51
51
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
52
|
-
"@vaadin/vaadin-lumo-styles": "25.3.0-
|
|
52
|
+
"@vaadin/vaadin-lumo-styles": "25.3.0-beta2",
|
|
53
53
|
"sinon": "^22.0.0"
|
|
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": "
|
|
60
|
+
"gitHead": "d97ccbec217b60c39f3c8b2dd52473c79a48c8c1"
|
|
61
61
|
}
|
|
@@ -56,6 +56,18 @@ export class PopoverFocusController {
|
|
|
56
56
|
return;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
// Focus is on the popover itself: move into the content explicitly, so that
|
|
60
|
+
// the tab order does not depend on the browser's sequential focus navigation
|
|
61
|
+
// starting point (Firefox continues from the last clicked node).
|
|
62
|
+
if (!host.noTabFocus && isElementFocused(host)) {
|
|
63
|
+
const firstContent = getTabbableElements(host._overlayElement.$.content)[0];
|
|
64
|
+
if (firstContent) {
|
|
65
|
+
event.preventDefault();
|
|
66
|
+
firstContent.focus();
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
59
71
|
// Native Tab would land on the popover when DOM order places it right
|
|
60
72
|
// after the current element. Skip past it via the logical list.
|
|
61
73
|
const activeElement = getDeepActiveElement();
|
|
@@ -136,6 +148,11 @@ export class PopoverFocusController {
|
|
|
136
148
|
if (event.key !== 'Tab') {
|
|
137
149
|
return;
|
|
138
150
|
}
|
|
151
|
+
// Another controller (e.g. the one of a parent popover) has already moved
|
|
152
|
+
// focus for this event, so this one must not move it a second time.
|
|
153
|
+
if (event.defaultPrevented) {
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
139
156
|
if (event.shiftKey) {
|
|
140
157
|
this.__handleShiftTab(event);
|
|
141
158
|
} else {
|
package/web-types.json
CHANGED