mirror of
https://github.com/flarum/framework.git
synced 2024-11-28 20:16:08 +08:00
Prevent hide animation when opening modal from other modal
This commit is contained in:
parent
7fc0963e3c
commit
b7593bc6a8
|
@ -27,9 +27,14 @@ export default class Modal extends Component {
|
|||
this.attrs.onshow(() => this.onready());
|
||||
}
|
||||
|
||||
onremove() {
|
||||
onbeforeremove() {
|
||||
// If the global modal state currently contains a modal,
|
||||
// we've just opened up a new one, and accordingly,
|
||||
// we don't need to show a hide animation.
|
||||
if (!app.modal.modal) {
|
||||
this.attrs.onhide();
|
||||
}
|
||||
}
|
||||
|
||||
view() {
|
||||
if (this.alertAttrs) {
|
||||
|
@ -107,7 +112,7 @@ export default class Modal extends Component {
|
|||
* Hide the modal.
|
||||
*/
|
||||
hide() {
|
||||
this.attrs.onhide();
|
||||
app.modal.close();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user