Skip to content

Commit

Permalink
fix: don't handle dragstart event if default is prevented (#1426)
Browse files Browse the repository at this point in the history
  • Loading branch information
upsuper authored and darthtrevino committed Jul 3, 2019
1 parent a1fbcd2 commit 3a70c80
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/core/html5-backend/src/HTML5Backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,13 +351,21 @@ export default class HTML5Backend implements Backend {
}

private handleDragStart(e: DragEvent, sourceId: string) {
if (e.defaultPrevented) {
return
}

if (!this.dragStartSourceIds) {
this.dragStartSourceIds = []
}
this.dragStartSourceIds.unshift(sourceId)
}

private handleTopDragStart = (e: DragEvent) => {
if (e.defaultPrevented) {
return
}

const { dragStartSourceIds } = this
this.dragStartSourceIds = null

Expand Down

0 comments on commit 3a70c80

Please sign in to comment.