From c7fae26b52c7aa562e1c81b8d7ef34b32afee6c2 Mon Sep 17 00:00:00 2001 From: Patricia Juarez Date: Wed, 19 Jul 2017 19:04:57 +0200 Subject: [PATCH] Moved mfp.isOpen= false after really close the modal --- dist/jquery.magnific-popup.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dist/jquery.magnific-popup.js b/dist/jquery.magnific-popup.js index 927b3c1f..3c587823 100644 --- a/dist/jquery.magnific-popup.js +++ b/dist/jquery.magnific-popup.js @@ -388,15 +388,16 @@ MagnificPopup.prototype = { if(!mfp.isOpen) return; _mfpTrigger(BEFORE_CLOSE_EVENT); - mfp.isOpen = false; // for CSS3 animation if(mfp.st.removalDelay && !mfp.isLowIE && mfp.supportsTransition ) { mfp._addClassToMFP(REMOVING_CLASS); setTimeout(function() { mfp._close(); + mfp.isOpen = false; }, mfp.st.removalDelay); } else { mfp._close(); + mfp.isOpen = false; } },