Browse Source

fix: close dialog on unmount

Sv443 11 tháng trước cách đây
mục cha
commit
593b83a4d2
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  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 = [