Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Configure undraggable tags in Sortables.

The input, button, a, textarea, select and option tags aren't draggable
when using Sortables. This patch adds an unDraggableTags option that can
be passed to Sortables to override the above list, allowing you to drag
a container element even when you click on one of the (undraggable)
elements within it.
  • Loading branch information...
commit 225a0636b18c128b29db1d169bdf4aed42f2b469 1 parent 1f5eab4
@gma authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 Source/Drag/Sortables.js
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']
@@ -148,7 +149,7 @@ var Sortables = new Class({
if (
!this.idle ||
event.rightClick ||
- ['button', 'input', 'a', 'textarea', 'select', 'option'].contains('tag'))
+ this.options.unDraggableTags.contains('tag'))
) return;
this.idle = false;
Please sign in to comment.
Something went wrong with that request. Please try again.