Browse files

Merge pull request #1136 from gma/configure-undraggable-sortables

Configure undraggable tags in Sortables.
  • Loading branch information...
2 parents b8d527b + 225a063 commit de65301e61666e5062620d68dbd0bc158287ea21 @fakedarren fakedarren committed Jul 28, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 Source/Drag/Sortables.js
View
5 Source/Drag/Sortables.js
@@ -36,7 +36,8 @@ var Sortables = new Class({
dragOptions: {}/*<1.2compat>*/,
snap: 4,
constrain: false,
- preventDefault: false
+ preventDefault: false,
+ unDraggableTags: ['button', 'input', 'a', 'textarea', 'select', 'option']
/*</1.2compat>*/
},
@@ -148,7 +149,7 @@ var Sortables = new Class({
if (
!this.idle ||
event.rightClick ||
- ['button', 'input', 'a', 'textarea', 'select', 'option'].contains(event.target.get('tag'))
+ this.options.unDraggableTags.contains(event.target.get('tag'))
) return;
this.idle = false;

0 comments on commit de65301

Please sign in to comment.