Skip to content

Commit

Permalink
fix: issue with drag and drop partial selections.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sagar DV authored and Sagar DV committed Apr 15, 2020
1 parent b7b1c59 commit 4f8044d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/currency-mask.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ export class CurrencyMaskDirective implements AfterViewInit, ControlValueAccesso
}
}

@HostListener("drop", ["$event"])
handleDrop(event: any) {
if (!this.isChromeAndroid()) {
event.preventDefault();
}
}

isChromeAndroid(): boolean {
return /chrome/i.test(navigator.userAgent) && /android/i.test(navigator.userAgent);
}
Expand Down

0 comments on commit 4f8044d

Please sign in to comment.