refer to original event to get to the data (#4604)

* refer to original event to get to the data

* Use the correct decorated event by jQuery
pull/4600/head
ulferts 8 years ago committed by Oliver Günther
parent 5043740bf9
commit 4e4d78aa2d
  1. 5
      frontend/app/components/work-packages/wp-attachments-formattable-field/wp-attachments-formattable.directive.ts

@ -27,15 +27,16 @@ export class WpAttachmentsFormattableController {
}
public handleDrop = (evt:DragEvent):void => {
public handleDrop = (evt:JQueryEventObject):void => {
evt.preventDefault();
evt.stopPropagation();
const textarea:ng.IAugmentedJQuery = this.$element.find('textarea');
this.viewMode = (textarea.length > 0) ? ViewMode.EDIT : ViewMode.SHOW;
const originalEvent = (evt.originalEvent as DragEvent);
const workPackage:WorkPackageResourceInterface = (this.$scope as any).workPackage;
const dropData:DropModel = new DropModel(this.$location, evt.dataTransfer, workPackage);
const dropData:DropModel = new DropModel(this.$location, originalEvent.dataTransfer, workPackage);
var description:any;

Loading…
Cancel
Save