@brightspace-ui/core 3.148.3 → 3.148.5
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.
@@ -141,7 +141,7 @@ class ListDemoNested extends LitElement {
|
|
141
141
|
if (!this.shadowRoot) return;
|
142
142
|
const newItem = this.shadowRoot.querySelector('d2l-list').getListItemByKey(sourceListItems[0].key);
|
143
143
|
newItem.activateDragHandle();
|
144
|
-
},
|
144
|
+
}, 50);
|
145
145
|
}
|
146
146
|
|
147
147
|
}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { css, html, LitElement } from 'lit';
|
2
2
|
import { findComposedAncestor, isComposedAncestor } from '../../helpers/dom.js';
|
3
3
|
import { getComposedActiveElement, getFirstFocusableDescendant, getFocusableDescendants, getLastFocusableDescendant, getNextFocusable, getPreviousFocusable } from '../../helpers/focus.js';
|
4
|
+
import { getFlag } from '../../helpers/flags.js';
|
4
5
|
import { isInteractiveDescendant } from '../../mixins/interactive/interactive-mixin.js';
|
5
6
|
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
6
7
|
|
@@ -17,6 +18,8 @@ const keyCodes = {
|
|
17
18
|
UP: 38
|
18
19
|
};
|
19
20
|
|
21
|
+
const listItemUpButtonFixFlag = getFlag('GAUD-8229-list-up-button-fix', true);
|
22
|
+
|
20
23
|
/**
|
21
24
|
* A component for generating a list item's layout with forced focus ordering and grid support.
|
22
25
|
* Focusable items placed in the "content" slot will have their focus removed; use the content-action
|
@@ -422,13 +425,27 @@ class ListItemGenericLayout extends RtlMixin(LitElement) {
|
|
422
425
|
do {
|
423
426
|
// this check needs to account for standard list-items as well as custom
|
424
427
|
nestedList = previousElement.querySelector('[slot="nested"]') || previousElement.shadowRoot.querySelector('d2l-list');
|
425
|
-
if (
|
426
|
-
|
427
|
-
if (
|
428
|
-
|
428
|
+
if (listItemUpButtonFixFlag) {
|
429
|
+
// if there is nested list and nested list content is accessible
|
430
|
+
if (nestedList && (!previousElement.expandable || (previousElement.expandable && previousElement.expanded))) {
|
431
|
+
const nestedListItems = [...nestedList.children].filter(node => node.role === 'row');
|
432
|
+
if (nestedListItems.length) {
|
433
|
+
previousElement = nestedListItems[nestedListItems.length - 1];
|
434
|
+
} else {
|
435
|
+
break;
|
436
|
+
}
|
429
437
|
} else {
|
430
438
|
break;
|
431
439
|
}
|
440
|
+
} else {
|
441
|
+
if (nestedList) {
|
442
|
+
const nestedListItems = [...nestedList.children].filter(node => node.role === 'row');
|
443
|
+
if (nestedListItems.length) {
|
444
|
+
previousElement = nestedListItems[nestedListItems.length - 1];
|
445
|
+
} else {
|
446
|
+
break;
|
447
|
+
}
|
448
|
+
}
|
432
449
|
}
|
433
450
|
} while (nestedList);
|
434
451
|
return previousElement;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@brightspace-ui/core",
|
3
|
-
"version": "3.148.
|
3
|
+
"version": "3.148.5",
|
4
4
|
"description": "A collection of accessible, free, open-source web components for building Brightspace applications",
|
5
5
|
"type": "module",
|
6
6
|
"repository": "https://github.com/BrightspaceUI/core.git",
|