Ver Fonte

fix: close dialog on unmount

Sv443 há 11 meses atrás
pai
commit
83dbf247bd
1 ficheiros alterados com 3 adições e 1 exclusões
  1. 3 1
      src/components/BytmDialog.ts

+ 3 - 1
src/components/BytmDialog.ts

@@ -107,8 +107,10 @@ export class BytmDialog extends NanoEmitter<{
     return bgElem;
   }
 
-  /** Clears all dialog contents (unmounts them from the DOM) in preparation for a new rendering call */
+  /** Closes the dialog and clears all its contents (unmounts elements from the DOM) in preparation for a new rendering call */
   public unmount() {
+    this.close();
+
     this.dialogMounted = false;
 
     const clearSelectors = [