-
-
Save codesburner/901450 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iOsScrollingToggle : function(enabled){ | |
function preventScroll(e){ | |
e.preventDefault(); | |
e.stopPropagation(); | |
} | |
// This should prevent people from scrolling away from the modal window without closing it | |
if(enabled){ | |
document.body.removeEventListener('touchmove',preventScroll,false); | |
} else { | |
document.body.addEventListener('touchmove',preventScroll,false); | |
} | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment