Skip to content

Commit

Permalink
bugfix: resolves #40
Browse files Browse the repository at this point in the history
  • Loading branch information
ObaidUrRehman committed Apr 11, 2017
1 parent 447db5d commit a17bcfe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/directives/draggable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ export class Draggable {
this.ng2DragDropService.dragData = this.dragData;
this.ng2DragDropService.scope = this.dragScope;

// Firefox requires setData() to be called otherwise the drag does not work.
// We don't use setData() to transfer data anymore so this is just a dummy call.
if (e.dataTransfer != null)
e.dataTransfer.setData('text', '');

e.stopPropagation();
this.onDragStart.emit(e);
}
Expand Down

0 comments on commit a17bcfe

Please sign in to comment.