diff --git a/docs/js/modal.js b/docs/js/modal.js index 463543fd..05fac37d 100644 --- a/docs/js/modal.js +++ b/docs/js/modal.js @@ -16,7 +16,7 @@ let visibleModal = null; // Toggle modal const toggleModal = event => { event.preventDefault(); - const modal = document.getElementById(event.target.getAttribute('data-target')); + const modal = document.getElementById(event.currentTarget.getAttribute('data-target')); (typeof(modal) != 'undefined' && modal != null) && isModalOpen(modal) ? closeModal(modal) : openModal(modal) } @@ -92,4 +92,4 @@ const getScrollbarWidth = () => { // Is scrollbar visible const isScrollbarVisible = () => { return document.body.scrollHeight > screen.height; -} \ No newline at end of file +}