Skip to content

Commit

Permalink
chore: DragEvent issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jkuri committed Mar 20, 2017
1 parent 3b64320 commit 1b64d11
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ngx-uploader",
"description": "Angular File Uploader",
"version": "2.2.3",
"version": "2.2.4",
"license": "MIT",
"main": "bundle/ngx-uploader.umd.js",
"module": "ngx-uploader.js",
Expand Down
4 changes: 2 additions & 2 deletions src/directives/ng-file-drop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class NgFileDropDirective implements OnChanges, OnInit {
this.el.nativeElement.addEventListener('dragover', this.stopEvent, false);
}

@HostListener('drop', ['$event']) onDrop(e: DragEvent): void {
@HostListener('drop', ['$event']) onDrop(e: any): void {
this.onFileOver.emit(false);
this.files = Array.from<File>(e.dataTransfer.files);
if (!this.files || !this.files.length) {
Expand Down Expand Up @@ -143,7 +143,7 @@ export class NgFileDropDirective implements OnChanges, OnInit {
this.onFileOver.emit(false);
}

private stopEvent(e: DragEvent): void {
private stopEvent(e: any): void {
e.stopPropagation();
e.preventDefault();
}
Expand Down

0 comments on commit 1b64d11

Please sign in to comment.