diff --git a/dist/ratchet.js b/dist/ratchet.js index 084a559..d34a4ac 100644 --- a/dist/ratchet.js +++ b/dist/ratchet.js @@ -28,7 +28,10 @@ window.addEventListener('touchend', function (event) { var modal = getModal(event); - if (modal) modal.classList.toggle('active'); + if (modal) { + modal.classList.toggle('active'); + event.preventDefault(); // prevents rewriting url (apps can still use hash values in url) + } }); }();/* ---------------------------------- * POPOVER v1.0.0 diff --git a/lib/js/modals.js b/lib/js/modals.js index 4448107..480c3af 100644 --- a/lib/js/modals.js +++ b/lib/js/modals.js @@ -20,6 +20,9 @@ window.addEventListener('touchend', function (event) { var modal = getModal(event); - if (modal) modal.classList.toggle('active'); + if (modal) { + modal.classList.toggle('active'); + event.preventDefault(); // prevents rewriting url (apps can still use hash values in url) + } }); }(); \ No newline at end of file