Jelajahi Sumber

fix: close dialog on unmount

Sv443 11 bulan lalu
induk
melakukan
593b83a4d2
1 mengubah file dengan 3 tambahan dan 1 penghapusan
  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 = [