Skip to content

Commit

Permalink
fix(edge): Wrapped setting of dropEffect in try/catch block, as i…
Browse files Browse the repository at this point in the history
…t causes errors in MS Edge/IE11 (#258)

* wrapped setting of `dropEffect` in `try/catch`, as it causes errors in MS Edge/IE11

Closes #248
  • Loading branch information
bmueller-sykes authored and okonet committed Oct 31, 2016
1 parent 208d8e5 commit cf0db15
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/index.js
Expand Up @@ -68,7 +68,11 @@ class Dropzone extends React.Component {
onDragOver(e) {
e.preventDefault();
e.stopPropagation();
e.dataTransfer.dropEffect = 'copy'; // eslint-disable-line no-param-reassign
try {
e.dataTransfer.dropEffect = 'copy'; // eslint-disable-line no-param-reassign
} catch (err) {
// continue regardless of error
}
return false;
}

Expand Down

0 comments on commit cf0db15

Please sign in to comment.