Skip to content

Instantly share code, notes, and snippets.

@sairion
Created January 25, 2014 04:44
Show Gist options
  • Save sairion/8612000 to your computer and use it in GitHub Desktop.
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.
document.addEventListener('touchmove', function(e){e.preventDefault();}, false);
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