1
0
Эх сурвалжийг харах

fix: close dialog on unmount

Sv443 11 сар өмнө
parent
commit
83dbf247bd

+ 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 = [