Skip to content
This repository has been archived by the owner on Nov 21, 2019. It is now read-only.

Commit

Permalink
fix draggable start to not break links
Browse files Browse the repository at this point in the history
Refs #36
  • Loading branch information
rkusa committed May 22, 2015
1 parent de15e32 commit dbf63e7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions touch-dnd.js
Original file line number Diff line number Diff line change
Expand Up @@ -480,12 +480,11 @@
}

e = e.originalEvent || e // zepto <> jquery compatibility
e.preventDefault() // prevent text selection

if (this.opts.cancel) {
var target = $(e.target)
while (target[0] !== this.el[0]) {
if (target.is(this.opts.cancel)) return false
if (target.is(this.opts.cancel)) return
target = target.parent()
}
}
Expand All @@ -499,9 +498,12 @@
}
target = target.parent()
}
if (!isHandle) return false
if (!isHandle) return
}

// prevent text selection
e.preventDefault()

var el = this.el, helper
if (this.opts.clone) {
if (typeof this.opts.clone === 'function') {
Expand Down

0 comments on commit dbf63e7

Please sign in to comment.