From dedf76c1d01c90458d2aefeecaa23c5854b7c556 Mon Sep 17 00:00:00 2001 From: Liam Tarpey Date: Wed, 21 Oct 2020 13:21:15 +0100 Subject: [PATCH] SQ fixes from tests --- lib/src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/index.js b/lib/src/index.js index 275c7dc..aa29e93 100644 --- a/lib/src/index.js +++ b/lib/src/index.js @@ -56,7 +56,7 @@ const MicroModal = (() => { } showModal (event = null) { - const openClass = this.config.openClass.split(' '); + const openClass = this.config.openClass.split(' ') this.activeElement = document.activeElement this.modal.setAttribute('aria-hidden', 'false') this.modal.classList.add(...openClass) @@ -86,8 +86,8 @@ const MicroModal = (() => { } this.config.onClose(this.modal, this.activeElement, event) + let openClass = this.config.openClass.split(' ') // <- old school ftw if (this.config.awaitCloseAnimation) { - let openClass = this.config.openClass.split(' ') // <- old school ftw this.modal.addEventListener('animationend', function handler () { modal.classList.remove(...openClass) modal.removeEventListener('animationend', handler, false)