Skip to content

Instantly share code, notes, and snippets.

@glideranderson
Created June 14, 2012 18:17
Show Gist options
  • Save glideranderson/2931918 to your computer and use it in GitHub Desktop.
Save glideranderson/2931918 to your computer and use it in GitHub Desktop.
Unsure what return does for QQ Uploader (errors in ie9)
_isValidFileDrag: function(e){
var dt = e.dataTransfer,
// do not check dt.types.contains in webkit, because it crashes safari 4
isWebkit = navigator.userAgent.indexOf("AppleWebKit") > -1;
console.log(dt);
// dt.effectAllowed is none in Safari 5
// dt.types.contains check is for firefox
return dt && dt.effectAllowed != 'none' &&
(dt.files || (!isWebkit && dt.types.contains && dt.types.contains('Files')));
}
// errors in ie9 undefined method at line with return character 9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment