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

[BUG] isDragReject set to true for accepted .rar file type #1342

Open
grigorischristainas opened this issue Feb 13, 2024 · 0 comments
Open
Labels

Comments

@grigorischristainas
Copy link

Describe the bug
This issue is reproducible in Windows, but not in Linux.

I am trying to visually indicate whether a file is accepted or not for upload through drag & drop by checking the isDragReject value and changing the style of a specific area. However, this value is incorrect when trying to upload a .rar file. More specifically, it is set to true while dragging the file over the upload area, but the file is eventually accepted.

To Reproduce
Please check the following codesandbox:
https://codesandbox.io/p/devbox/musing-mestorf-9j2y64?file=%2Fsrc%2F_app.jsx%3A10%2C5-10%2C17

Steps to reproduce the behavior:

  1. Have demo .rar and .png files available locally
  2. Drag & drop the .rar file on the corresponding area (styled with a green border)
  3. You should see the border turn to red
  4. Drop the file on the area
  5. File is marked as accepted and displayed under the Accepted files section

Repeat the previous steps with the .png file. You should not see the area border turn to red.

Expected behavior
Expected the isDragReject value to be equal to false but instead it is equal to true. However, the file is eventually accepted. This causes an incorrect behavior when trying to visually indicate whether this file is valid or invalid for upload.

Desktop:

  • OS: Windows 10 Pro
  • Browser: Reproduced in latest versions of Chrome and Firefox
  • Version: 14.2.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant