@momentum-design/components 0.133.22 → 0.133.23
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.
|
@@ -173,8 +173,8 @@
|
|
|
173
173
|
"attribute": "disabled",
|
|
174
174
|
"reflects": true,
|
|
175
175
|
"inheritedFrom": {
|
|
176
|
-
"name": "
|
|
177
|
-
"module": "
|
|
176
|
+
"name": "AccordionButton",
|
|
177
|
+
"module": "components/accordionbutton/accordionbutton.component.js"
|
|
178
178
|
}
|
|
179
179
|
},
|
|
180
180
|
{
|
|
@@ -493,8 +493,8 @@
|
|
|
493
493
|
"default": "undefined",
|
|
494
494
|
"fieldName": "disabled",
|
|
495
495
|
"inheritedFrom": {
|
|
496
|
-
"name": "
|
|
497
|
-
"module": "src/
|
|
496
|
+
"name": "AccordionButton",
|
|
497
|
+
"module": "src/components/accordionbutton/accordionbutton.component.ts"
|
|
498
498
|
}
|
|
499
499
|
},
|
|
500
500
|
{
|
|
@@ -91,7 +91,12 @@ export const ListNavigationMixin = (superClass) => {
|
|
|
91
91
|
if (newIndex !== -1) {
|
|
92
92
|
// When user clicked on a focusable element inside the item, we update the navigation index, but
|
|
93
93
|
// keep the focus on the clicked element.
|
|
94
|
-
const
|
|
94
|
+
const isActiveElementTarget = document.activeElement === target;
|
|
95
|
+
const isActiveElementContainedByTarget = document.activeElement &&
|
|
96
|
+
// eslint-disable-next-line no-bitwise
|
|
97
|
+
document.activeElement.compareDocumentPosition(target) & Node.DOCUMENT_POSITION_CONTAINED_BY;
|
|
98
|
+
const focusNewItem = !(this.navItems.at(newIndex) !== target &&
|
|
99
|
+
(isActiveElementTarget || isActiveElementContainedByTarget));
|
|
95
100
|
this.resetTabIndexAndSetFocus(newIndex, undefined, focusNewItem, false);
|
|
96
101
|
}
|
|
97
102
|
};
|