Skip to content

Instantly share code, notes, and snippets.

@Andrewpk
Created November 17, 2021 23:16
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 Andrewpk/0d4d7debd10715c47c9844e1a2a64b71 to your computer and use it in GitHub Desktop.
Save Andrewpk/0d4d7debd10715c47c9844e1a2a64b71 to your computer and use it in GitHub Desktop.
Allow paste in Chrome/Safari when websites decide to block it.
var allowPaste = function(e) {
e.stopImmediatePropagation();
return true;
};
document.addEventListener('paste', allowPaste, true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment