Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isDragAccept broken in Chrome due to #878 #895

Closed
1 task done
emrosenf opened this issue Oct 16, 2019 · 1 comment
Closed
1 task done

isDragAccept broken in Chrome due to #878 #895

emrosenf opened this issue Oct 16, 2019 · 1 comment

Comments

@emrosenf
Copy link

  • I found a bug

What is the current behavior?

utils/index.js line 10 Does not account for the possibility that file.size is undefined.

export function fileMatchSize(file, maxSize, minSize) {
  return file.size <= maxSize && file.size >= minSize
}

A DataTransferItem does not have the size property.

Therefore the (default) comparison will be undefined <= Infinity && undefined >= 0 which is false, and so isDragAccept will always be false.

This bug was introduced in #878 which was a fix for #861

Using latest Chrome: 77.0.3865.120 (64-bit) on OSX 10.14.6

@rolandjitsu
Copy link
Collaborator

Duplicate of #888.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants