Skip to content

Instantly share code, notes, and snippets.

@osv
Created December 26, 2015 09:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save osv/5bc2133fec659c6f7f0c to your computer and use it in GitHub Desktop.
Save osv/5bc2133fec659c6f7f0c to your computer and use it in GitHub Desktop.
Prevent default drop behavior (loading a file) outside of the drop zone
# Prevent default drop behavior (loading a file) outside of the drop zone
window.addEventListener 'dragover', ((e) -> e.preventDefault()), false
window.addEventListener 'drop', ((e) -> e.preventDefault()), false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment