Browse Source

Prevent modal from triggering while scrolling

pull/643/head
cadrell0 11 years ago
parent
commit
839276784f
  1. 14
      js/modals.js

14
js/modals.js

@ -29,7 +29,21 @@
}
};
var dragging = false;
window.addEventListener('touchmove', function () {
dragging = true;
});
window.addEventListener('touchstart', function () {
dragging = false;
});
window.addEventListener('touchend', function (event) {
if (dragging) {
return;
}
var modal = getModal(event);
if (modal) {
if (modal && modal.classList.contains('modal')) {

Loading…
Cancel
Save