Skip to content

Commit 93b5f9c

Browse files
rychkogGeorgii Rychko
authored andcommitted
fix(dragndrop): check whether stopPropagation is available on event (closes #115)
1 parent 5069953 commit 93b5f9c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/draggable/node-draggable.directive.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ export class NodeDraggableDirective implements OnDestroy, OnInit {
4343
}
4444

4545
private handleDragStart(e: DragEvent): any {
46-
e.stopPropagation();
46+
if (e.stopPropagation) {
47+
e.stopPropagation();
48+
}
4749

4850
this.nodeDraggableService.captureNode(new CapturedNode(this.nodeDraggable, this.tree));
4951

@@ -71,7 +73,9 @@ export class NodeDraggableDirective implements OnDestroy, OnInit {
7173

7274
private handleDrop(e: DragEvent): any {
7375
e.preventDefault();
74-
e.stopPropagation();
76+
if (e.stopPropagation) {
77+
e.stopPropagation();
78+
}
7579

7680
this.removeClass('over-drop-target');
7781

0 commit comments

Comments
 (0)