From bb69c3bd571199125caae5243e0b53e1a2196d41 Mon Sep 17 00:00:00 2001 From: Wadim Kalmykov <36057469+w-4@users.noreply.github.com> Date: Sat, 10 Oct 2020 06:04:53 +0700 Subject: [PATCH] Reduce modal hide timeout (#2367) --- js/src/common/components/Modal.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/src/common/components/Modal.js b/js/src/common/components/Modal.js index 23338ee34..96e6cd9d9 100644 --- a/js/src/common/components/Modal.js +++ b/js/src/common/components/Modal.js @@ -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)); } }