Created
January 25, 2014 04:44
-
-
Save sairion/8612000 to your computer and use it in GitHub Desktop.
Kill Mobile Safari or Mobile Chrome browser window's default rubber band effect being triggered when using drag/swipe event on child element.
This file contains 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
document.addEventListener('touchmove', function(e){e.preventDefault();}, false); |
This file contains 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
html{ | |
width:100%; | |
height:100%; | |
overflow:hidden; | |
} | |
body{ | |
width:100%; | |
height:100%; | |
overflow:auto; | |
-webkit-overflow-scrolling:touch; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment