@momentum-design/components 0.133.21 → 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.
|
@@ -801,7 +801,10 @@ class Popover extends KeyDownHandledMixin(KeyToActionMixin(BackdropMixin(Prevent
|
|
|
801
801
|
this.setAttribute('color', Object.values(COLOR).includes(this.color) ? this.color : DEFAULTS.COLOR);
|
|
802
802
|
}
|
|
803
803
|
if (changedProperties.has('appendTo')) {
|
|
804
|
-
|
|
804
|
+
// only setup appendTo when the component is connected to the DOM
|
|
805
|
+
// this fixes an issue which causes popovers to be orphaned in the DOM without the appendTo logic being cleaned up,
|
|
806
|
+
// cause of Lit deferring the updated() to fire after a disconnect
|
|
807
|
+
if (this.appendTo && this.isConnected) {
|
|
805
808
|
this.utils.setupAppendTo();
|
|
806
809
|
}
|
|
807
810
|
else {
|
|
@@ -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
|
};
|