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
In v10.6.1useDropZone's dataTypes allowed us filtering based on event.dataTransfer.types, but v10.7.0 removed this ability in PR #3540.
The advantage of using event.dataTransfer.types is on dragstart the data can be set set via event.dataTransfer.setData('text/plain', event.target.id), allowing the dragenter event to filter data types based on the event.dataTransfer.types. However, in v10.7.0 filtering is done using event.dataTransfer.items, which doesn't utilize the setData data.
I propose reverting the changes from PR #3540, or adding back this ability.
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a VueUse issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
Check that this is a concrete bug. For Q&A open a GitHub Discussion.
Describe the bug
In
v10.6.1
useDropZone
'sdataTypes
allowed us filtering based onevent.dataTransfer.types
, butv10.7.0
removed this ability in PR #3540.The advantage of using
event.dataTransfer.types
is ondragstart
the data can be set set viaevent.dataTransfer.setData('text/plain', event.target.id)
, allowing thedragenter
event to filter data types based on theevent.dataTransfer.types
. However, inv10.7.0
filtering is done usingevent.dataTransfer.items
, which doesn't utilize thesetData
data.I propose reverting the changes from PR #3540, or adding back this ability.
Reproductions
v10.6.1
In this example, drag the draggable item over the drop zone and notice how
isOverDropZone
changes totrue
.https://stackblitz.com/edit/vitejs-vite-hg3ssu?file=src%2FApp.vue
v10.7.0
In this example, drag the draggable item over the drop zone and notice how
isOverDropZone
staysfalse
.https://stackblitz.com/edit/vitejs-vite-yhkerf?file=src%2FApp.vue
Reproduction
https://stackblitz.com/edit/vitejs-vite-yhkerf?file=src%2FApp.vue
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: