question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] In react 18, dragging accepted file over dropzone sets isDragReject to true

See original GitHub issue

Describe the bug Described in issue name

To Reproduce

https://codesandbox.io/s/react-dropzone-example-forked-nfvn0p

Steps to reproduce the behavior: useDropzone({..., accept: 'image/*'})

drag the image (eg.) over the dropzone, it set state to isDragReject

Expected behavior Should set isDragAccept to true

Desktop (please complete the following information):

  • OS: macOs
  • Browser Chrome
  • Version 99

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:7
  • Comments:21

github_iconTop GitHub Comments

4reactions
rolandjitsucommented, May 1, 2022

@andylacko @vsrc @alfupe @MuscularSloth @travisdahl @kristinzinser could you upgrade to v14 and let me know if the issue is resolved?

2reactions
alfupecommented, Apr 21, 2022

In my case it is happening in Chrome (tested versions 85 and 100) and React 18. In another project, React 17 and Chrome 100 is working fine.

EDIT: I’ve make it to work reverting from the new way of mounting the root component to the classic one.

👎🏻

const root = createRoot(document.getElementById('root'));
root.render(<App />);

👍🏼

ReactDOM.render(<App />, document.getElementById('root'));
Read more comments on GitHub >

github_iconTop Results From Across the Web

react-dropzone: inspect files while dragging is active
So, if we drag an image or a pdf file the value isDragAccept is set to true , the text Drop files now...
Read more >
react-dropzone - Bountysource
file icons and upload spinners (like the dropzone.js examples) ... [BUG] In react 18, dragging accepted file over dropzone sets isDragReject to true...
Read more >
react-dropzone
Files are accepted or rejected based on the accept , multiple , minSize and maxSize props. accept must be a valid MIME type...
Read more >
React v18.0 – React Blog
The new rendering behavior in React 18 is only enabled in the parts of your app that use new features. The overall upgrade...
Read more >
React Grid: Drag & Drop
To allow dragging from the grid, set the property dndSource=true on one of ... This is because the drop zone is programmed to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found