diff --git a/client/src/views/modal.js b/client/src/views/modal.js index d03aaf435e..18bc06561c 100644 --- a/client/src/views/modal.js +++ b/client/src/views/modal.js @@ -569,15 +569,14 @@ class ModalView extends View { */ actionCancel() { this.trigger('cancel'); - this.dialog.close(); + this.close(); } /** * A `close` action. */ actionClose() { - this.trigger('cancel'); - this.dialog.close(); + this.actionCancel(); } /** @@ -585,6 +584,16 @@ class ModalView extends View { */ close() { this.dialog.close(); + + if (!this.getParentView()) { + return; + } + + const key = this.getParentView().getViewKey(this); + + if (key) { + this.getParentView().clearView(key); + } } /**