From c843f4273c7450dc2bb68b930c4984ab3a5c1a57 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) --- framework/core/js/src/common/components/Modal.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/framework/core/js/src/common/components/Modal.js b/framework/core/js/src/common/components/Modal.js index 23338ee34..96e6cd9d9 100644 --- a/framework/core/js/src/common/components/Modal.js +++ b/framework/core/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)); } }