소스 검색

fix: close dialog on unmount

Sv443 11 달 전
부모
커밋
83dbf247bd
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  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 = [