Skip to content

Commit

Permalink
bug #2154 [Dropzone] Enable file replacement via "drag-and-drop" (rrr63)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.x branch.

Discussion
----------

[Dropzone] Enable file replacement via "drag-and-drop"

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| Issues        | Fix #1480
| License       | MIT

Adding `dragenter` event to allow file replacement

Commits
-------
  • Loading branch information
smnandre committed Oct 7, 2024
1 parent ce483d7 commit 45770b0
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
bug #2154 [Dropzone] Enable file replacement via "drag-and-drop" (rrr63)

This PR was merged into the 2.x branch.

Discussion
----------

[Dropzone] Enable file replacement via "drag-and-drop"

| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| Issues | Fix #1480
| License | MIT

Adding `dragenter` event to allow file replacement

Commits
-------



47 changes: 47 additions & 0 deletions .notes
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---------------------------------------------------------------------------

by smnandre at 2024-09-11T21:39:36Z

Hi @rrr63 ! Thank you for this PR

Could you add just a screenshot or two, for other to understand what you're adding ?

I'm wondering, you add on dragEnter, but you don't revert if the drag is canceled ?

Also, it would be great to add a test or two :)



---------------------------------------------------------------------------

by rrr63 at 2024-09-12T06:34:12Z

Hi @smnandre ,

You're right, i canceled when the drag leaves, and added a test for both, enter and leave.
Both, enter and leave are in the same test to get the right drag area from enter event.

Demo :
![dropzone](https://github.com/user-attachments/assets/76143fdd-1dbc-4129-92f2-43e9780eed4b)




---------------------------------------------------------------------------

by smnandre at 2024-09-12T17:27:47Z

Wow, thank you very much! I'll try tonight but this will probably more be this week-end :)

---------------------------------------------------------------------------

by smnandre at 2024-09-12T17:31:45Z

Could you add a entry in the CHANGELOG (inside the Dropzone folder) ? Next version will be 2.20

---------------------------------------------------------------------------

by rrr63 at 2024-09-12T18:36:43Z

Sure i can, just copied the title :)

0 comments on commit 45770b0

Please sign in to comment.