Skip to content

Instantly share code, notes, and snippets.

@sonnyp
Created April 4, 2012 14:19
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 sonnyp/2301495 to your computer and use it in GitHub Desktop.
Save sonnyp/2301495 to your computer and use it in GitHub Desktop.
On Safari mobile file input are disabled, this function check whether it's supported or not.
function fileInputSupport() {
var input = document.createElement('input');
input.type = 'file';
return !input.disabled;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment