@atlassian/aui 9.3.16 → 9.3.17
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/dist/aui/aui-prototyping.css +2 -2
- package/dist/aui/aui-prototyping.js +5 -5
- package/dist/aui/aui-prototyping.js.map +1 -1
- package/dist/aui/aui-prototyping.nodeps.css +1 -1
- package/dist/aui/aui-prototyping.nodeps.js +2 -2
- package/dist/aui/aui-prototyping.nodeps.js.map +1 -1
- package/package.json +1 -1
- package/src/js/aui/dropdown2.js +21 -2
- package/src/less/dialog2.less +1 -1
package/package.json
CHANGED
package/src/js/aui/dropdown2.js
CHANGED
|
@@ -35,8 +35,27 @@ function setDropdownTriggerActiveState(trigger, isActive) {
|
|
|
35
35
|
* @param {Event} [e] - the event that triggered the dropdown being shown
|
|
36
36
|
*/
|
|
37
37
|
function handleFocus(dropdown, e = {}) {
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
if (e && e.type) {
|
|
39
|
+
const isMouseEvent = e.type.indexOf('mouse') > -1 || e.type.indexOf('hover') > -1;
|
|
40
|
+
const isKeyDownEvent = e.type.indexOf('key') > -1;
|
|
41
|
+
if (dropdown.isSubmenu) {
|
|
42
|
+
!isMouseEvent ? dropdown.focusItem(0) : dropdown.focus();
|
|
43
|
+
} else if (isKeyDownEvent){
|
|
44
|
+
const isUpArrow = e.keyCode === keyCode.UP;
|
|
45
|
+
// set focus to last item in the menu to navigate bottom -> up
|
|
46
|
+
if (isUpArrow) {
|
|
47
|
+
const visibleItems = getVisibleDropdownItems(dropdown);
|
|
48
|
+
if (visibleItems && visibleItems.length) {
|
|
49
|
+
dropdown.focusItem(visibleItems.length - 1);
|
|
50
|
+
}
|
|
51
|
+
} else {
|
|
52
|
+
// if enter/space/downArrow than focus goes to the first item
|
|
53
|
+
dropdown.focusItem(0);
|
|
54
|
+
}
|
|
55
|
+
} else {
|
|
56
|
+
dropdown.focus();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
40
59
|
}
|
|
41
60
|
|
|
42
61
|
// LOADING STATES
|
package/src/less/dialog2.less
CHANGED
|
@@ -261,7 +261,7 @@
|
|
|
261
261
|
.make-it-fullscreen();
|
|
262
262
|
}
|
|
263
263
|
|
|
264
|
-
.aui-dialog2-content {
|
|
264
|
+
& .aui-dialog2-content {
|
|
265
265
|
height: calc(~"100vh" - @header-footer-combined-height);
|
|
266
266
|
max-height: none; // otherwise, the footer "creeps up" the dialog and takes up the available space.
|
|
267
267
|
}
|