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,8 +27,13 @@ export default class Modal extends Component {
|
||||||
this.attrs.onshow(() => this.onready());
|
this.attrs.onshow(() => this.onready());
|
||||||
}
|
}
|
||||||
|
|
||||||
onremove() {
|
onbeforeremove() {
|
||||||
this.attrs.onhide();
|
// 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() {
|
view() {
|
||||||
|
@ -107,7 +112,7 @@ export default class Modal extends Component {
|
||||||
* Hide the modal.
|
* Hide the modal.
|
||||||
*/
|
*/
|
||||||
hide() {
|
hide() {
|
||||||
this.attrs.onhide();
|
app.modal.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue
Block a user