Skip to content
This repository
Browse code

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 1 changed file with 3 additions and 2 deletions. Show diff stats Hide diff stats

  1. +3 2 Source/Drag/Sortables.js
5 Source/Drag/Sortables.js
@@ -36,7 +36,8 @@ var Sortables = new Class({
36 36 dragOptions: {}/*<1.2compat>*/,
37 37 snap: 4,
38 38 constrain: false,
39   - preventDefault: false
  39 + preventDefault: false,
  40 + unDraggableTags: ['button', 'input', 'a', 'textarea', 'select', 'option']
40 41 /*</1.2compat>*/
41 42 },
42 43
@@ -148,7 +149,7 @@ var Sortables = new Class({
148 149 if (
149 150 !this.idle ||
150 151 event.rightClick ||
151   - ['button', 'input', 'a', 'textarea', 'select', 'option'].contains(event.target.get('tag'))
  152 + this.options.unDraggableTags.contains(event.target.get('tag'))
152 153 ) return;
153 154
154 155 this.idle = false;

0 comments on commit de65301

Please sign in to comment.
Something went wrong with that request. Please try again.