@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
- if (this.appendTo) {
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 {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@momentum-design/components",
3
3
  "packageManager": "yarn@3.2.4",
4
- "version": "0.133.21",
4
+ "version": "0.133.22",
5
5
  "engines": {
6
6
  "node": ">=20.0.0",
7
7
  "npm": ">=8.0.0"