mirror of
https://github.com/flarum/core.git
synced 2025-08-24 00:53:27 +02:00
common: move modal manager clear code to clear method, and call it on micromodal close
This commit is contained in:
@@ -60,11 +60,13 @@ export default class ModalManager extends Component {
|
||||
MicroModal.show('Modal', {
|
||||
awaitCloseAnimation: true,
|
||||
onClose: () => {
|
||||
$('.modal-backdrop').fadeOut(200, function() {
|
||||
$('.modal-backdrop').fadeOut(200, function(this: Element) {
|
||||
this.remove();
|
||||
});
|
||||
|
||||
this.showing = false;
|
||||
|
||||
this.clear();
|
||||
},
|
||||
});
|
||||
|
||||
@@ -89,10 +91,6 @@ export default class ModalManager extends Component {
|
||||
// bit to give the `show` method the opportunity to prevent this from going
|
||||
// ahead.
|
||||
this.hideTimeout = setTimeout(() => MicroModal.close('Modal'));
|
||||
|
||||
this.modal = null;
|
||||
this.component = null;
|
||||
this.modalProps = {};
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -103,7 +101,9 @@ export default class ModalManager extends Component {
|
||||
this.component.onhide();
|
||||
}
|
||||
|
||||
this.modal = null;
|
||||
this.component = null;
|
||||
this.modalProps = {};
|
||||
|
||||
// app.current.retain = false;
|
||||
|
||||
|
Reference in New Issue
Block a user