From 12a150976c95da39d12858ce6442cdca43c94128 Mon Sep 17 00:00:00 2001
From: binseq <abdidebba@gmail.com>
Date: Thu, 10 Jun 2021 18:37:41 -0500
Subject: [PATCH] Fix for hide() method not working with css fade

This is my solution to this issue: https://github.com/twbs/bootstrap/issues/34213
---
 js/src/modal.js | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/js/src/modal.js b/js/src/modal.js
index 40fd226bf6..53be5a484a 100644
--- a/js/src/modal.js
+++ b/js/src/modal.js
@@ -152,10 +152,11 @@ class Modal extends BaseComponent {
     if (event) {
       event.preventDefault()
     }
-
-    if (!this._isShown || this._isTransitioning) {
-      return
-    }
+    
+    // This block is unnecessary and prevents hiding Modal with "fade" class until animation is finished.
+    //if (!this._isShown || this._isTransitioning) {
+    //  return
+    //}
 
     const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE)
 
-- 
GitLab