Permalink
Browse files

Merge pull request #54 from jogaco/master

Fixes #53: input elements can still gain focus on click when inside sortable elements
  • Loading branch information...
2 parents b7996fa + 474b9a0 commit 47dc49008ed369bd26a854ebd4152629ba1560d6 @johnny committed Dec 4, 2013
Showing with 6 additions and 3 deletions.
  1. +6 −3 source/js/jquery-sortable.js
@@ -93,9 +93,12 @@
$("body").removeClass("dragging")
},
// Called on mousedown. If falsy value is returned, the dragging will not start.
- onMousedown: function($item, _super, event) {
- event.preventDefault()
- return true
+ // If clicked on input element, ignore
+ onMousedown: function ($item, _super, event) {
+ if (event.target.nodeName != 'INPUT') {
+ event.preventDefault()
+ return true
+ }
},
// Template for the placeholder. Can be any valid jQuery input
// e.g. a string, a DOM element.

0 comments on commit 47dc490

Please sign in to comment.