Skip to content

Instantly share code, notes, and snippets.

@beshur
Created February 11, 2016 09:09
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 beshur/2ffa80a891593672fb8d to your computer and use it in GitHub Desktop.
Save beshur/2ffa80a891593672fb8d to your computer and use it in GitHub Desktop.
javascript Check if object in event is an input
var isInput = function(e) {
return (e.srcElement.contentEditable === "true"
|| e.srcElement == 'textarea' || e.srcElement == 'textarea');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment