@momentum-design/components 0.133.21 → 0.133.22
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 {
|