@salesforcedevs/dx-components 1.40.5-topic-alpha.6 → 1.40.5-topic-alpha.8
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
|
@@ -240,6 +240,16 @@ export default class Popover extends LightningElement {
|
|
|
240
240
|
this.dispatchEvent(new CustomEvent("controlarrowdown"));
|
|
241
241
|
break;
|
|
242
242
|
}
|
|
243
|
+
// A mouse-opened menu leaves focus on the control, so Escape lands
|
|
244
|
+
// here, not in the popover's own key handler.
|
|
245
|
+
case "Esc":
|
|
246
|
+
case "Escape": {
|
|
247
|
+
if (this.open) {
|
|
248
|
+
this.dispatchRequestCloseEvent("keypress-escape");
|
|
249
|
+
this.closePopover(true);
|
|
250
|
+
}
|
|
251
|
+
break;
|
|
252
|
+
}
|
|
243
253
|
default:
|
|
244
254
|
}
|
|
245
255
|
};
|
|
@@ -4,22 +4,32 @@
|
|
|
4
4
|
display: block;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
+
/* Always positioned, so a picker menu keeps the same anchor when focus
|
|
8
|
+
leaves. Toggling position on focus moved the closing menu up the page. */
|
|
9
|
+
:host {
|
|
10
|
+
position: relative;
|
|
11
|
+
}
|
|
12
|
+
|
|
7
13
|
/* Lift this row above later sibling pickers while its menu is open. */
|
|
8
14
|
:host(:focus-within) {
|
|
9
|
-
position: relative;
|
|
10
15
|
z-index: 2;
|
|
11
16
|
}
|
|
12
17
|
|
|
13
|
-
/* The tile's keyboard focus layers fill this row, picker included. isolate
|
|
14
|
-
keeps the fill above the row's background and below its content. */
|
|
15
18
|
.tree-item-row {
|
|
16
19
|
position: relative;
|
|
17
|
-
isolation: isolate;
|
|
18
20
|
display: flex;
|
|
19
21
|
align-items: center;
|
|
20
22
|
min-width: 0;
|
|
21
23
|
}
|
|
22
24
|
|
|
25
|
+
/* The tile's keyboard focus layers fill this row, picker included. isolate
|
|
26
|
+
keeps the fill above the row's background and below its content. Only while
|
|
27
|
+
focus is inside: a row that is always isolated traps its picker's menu, and
|
|
28
|
+
later rows cover the menu while it fades out after a click outside. */
|
|
29
|
+
.tree-item-row:focus-within {
|
|
30
|
+
isolation: isolate;
|
|
31
|
+
}
|
|
32
|
+
|
|
23
33
|
.tree-item-row dx-tree-tile {
|
|
24
34
|
flex: 1;
|
|
25
35
|
min-width: 0;
|