You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Depending on where an item is dragged from, monitor.getItem loses the state of DataTransferItems. If a file is dragged directly to the ref element from the os then the state will be tracked properly until the drag leaves the bounds of the browser window. If the same drag is brought back then the DataTransferItems will be empty.
What's worse is if the drag enters the browser with the cursor not directly over the ref element then the DataTransferItems will never be populated.
Reproduction
Open the console in the sandbox, then start dragging a file, at first it will have the correct mime type but then it will go away
I can confirm that this issues is partly fixed, but the state is still lost when the ref element is left, i.e. when you drag over the element and then leave it again -> item is empty again.
Additionally, the collect hook seems not to be called when the item changes, resulting in stale data returned from the useDrop hook.
Happens on Windows with standard Chrome and newest dependencies:
OS: Windows 10
Browser: Chrome 99.0.4844.51
Describe the bug
Depending on where an item is dragged from, monitor.getItem loses the state of DataTransferItems. If a file is dragged directly to the ref element from the os then the state will be tracked properly until the drag leaves the bounds of the browser window. If the same drag is brought back then the DataTransferItems will be empty.
What's worse is if the drag enters the browser with the cursor not directly over the ref element then the DataTransferItems will never be populated.
Reproduction
Open the console in the sandbox, then start dragging a file, at first it will have the correct mime type but then it will go away
Live Reproduction
Steps to reproduce the behavior:
Expected behavior
DataTransferItems should not be cleared on the same drag
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: