1
0
mirror of https://github.com/flarum/core.git synced 2025-07-15 22:06:24 +02:00

Reduce modal hide timeout (#2367)

This commit is contained in:
Wadim Kalmykov
2020-10-10 06:04:53 +07:00
committed by GitHub
parent 84ce740489
commit c843f4273c

View File

@ -35,7 +35,8 @@ export default class Modal extends Component {
this.attrs.animateHide();
// Here, we ensure that the animation has time to complete.
// See https://mithril.js.org/lifecycle-methods.html#onbeforeremove
return new Promise((resolve) => setTimeout(resolve, 1000));
// Bootstrap's Modal.TRANSITION_DURATION is 300 ms.
return new Promise((resolve) => setTimeout(resolve, 300));
}
}