Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

Configure undraggable tags in Sortables.
  • Loading branch information...
commit de65301e61666e5062620d68dbd0bc158287ea21 2 parents b8d527b + 225a063
Darren Waddell fakedarren authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 Source/Drag/Sortables.js
5 Source/Drag/Sortables.js
View
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.