From b1daa70a2a067bb3c9a577dff7b1f0986e3cf057 Mon Sep 17 00:00:00 2001 From: raphj Date: Sun, 28 Dec 2014 10:26:28 +0100 Subject: [PATCH] Make Sotable compatible xhtml comparisons of node names (via the nodeName property) are done in upper case. However, nodeName is lower case in xhtml. Let's do everything in upper case. --- Sortable.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sortable.js b/Sortable.js index 5d10475..4b82eec 100644 --- a/Sortable.js +++ b/Sortable.js @@ -809,7 +809,7 @@ do { if ( (tag === '>*' && el.parentNode === ctx) || ( - (tag === '' || el.nodeName == tag) && + (tag === '' || el.nodeName.toUpperCase() == tag) && (!selector.length || ((' ' + el.className + ' ').match(re) || []).length == selector.length) ) ) { @@ -937,7 +937,7 @@ */ function _index(/**HTMLElement*/el) { var index = 0; - while (el && (el = el.previousElementSibling) && (el.nodeName !== 'TEMPLATE')) { + while (el && (el = el.previousElementSibling) && (el.nodeName.toUpperCase() !== 'TEMPLATE')) { index++; } return index;