From b4e5c212a5daf0691d2088e49e780eb9b7802087 Mon Sep 17 00:00:00 2001 From: Isaac Kearse Date: Tue, 24 Jun 2014 14:19:15 +1200 Subject: [PATCH] Allow textareas to gain focus inside sortables --- source/js/jquery-sortable.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/js/jquery-sortable.js b/source/js/jquery-sortable.js index 5fcccf3..3f03d15 100644 --- a/source/js/jquery-sortable.js +++ b/source/js/jquery-sortable.js @@ -98,9 +98,9 @@ $("body").removeClass("dragging") }, // Called on mousedown. If falsy value is returned, the dragging will not start. - // If clicked on input element, ignore + // Ignore if element clicked is input, select or textarea onMousedown: function ($item, _super, event) { - if (!event.target.nodeName.match(/^(input|select)$/i)) { + if (!event.target.nodeName.match(/^(input|select|textarea)$/i)) { event.preventDefault() return true }