Skip to content

Commit

Permalink
fix(drap-drow): drop event is fired twice
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc-André Barbeau committed Oct 20, 2020
1 parent 1c90739 commit 5f36c8b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/common/src/lib/drag-drop/drag-drop.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ export class DragAndDropDirective {
public onDrop(evt) {
evt.preventDefault();
evt.stopPropagation();
if (evt.alreadyFired) {
return;
}
evt.alreadyFired = true;

this.background = 'inherit';
const filesObj = this.validExtensions(evt);
if (filesObj.valid.length) {
Expand Down

0 comments on commit 5f36c8b

Please sign in to comment.