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

useDropZone dataTypes filter #3910

Open
7 tasks done
alex-martinez opened this issue Apr 4, 2024 · 0 comments
Open
7 tasks done

useDropZone dataTypes filter #3910

alex-martinez opened this issue Apr 4, 2024 · 0 comments

Comments

@alex-martinez
Copy link

Describe the bug

In v10.6.1 useDropZone'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.

Reproductions

v10.6.1
In this example, drag the draggable item over the drop zone and notice how isOverDropZone changes to true.
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 stays false.
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

System:
  OS: macOS 13.6.3
  CPU: (10) arm64 Apple M1 Pro
  Memory: 92.45 MB / 16.00 GB
  Shell: 5.9 - /bin/zsh
Binaries:
  Node: 18.19.0 - ~/.nvm/versions/node/v18.19.0/bin/node
  npm: 10.2.3 - ~/.nvm/versions/node/v18.19.0/bin/npm
Browsers:
  Brave Browser: 123.1.64.116
  Chrome: 123.0.6312.107
  Chrome Canary: 125.0.6398.0
  Safari: 16.6
npmPackages:
  vue: ^3.4.21 => 3.4.21

Used Package Manager

npm

Validations

@dosubot dosubot bot added the vue: upstream label Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant