Browse Source

Merge pull request #243 from rkusa/rkusa-patch-1

fix index calculation to skip templates
pull/245/head
Lebedev Konstantin 10 years ago
parent
commit
dce3eb22d5
  1. 4
      Sortable.js

4
Sortable.js

@ -949,9 +949,11 @@
*/ */
function _index(/**HTMLElement*/el) { function _index(/**HTMLElement*/el) {
var index = 0; var index = 0;
while (el && (el = el.previousElementSibling) && (el.nodeName.toUpperCase() !== 'TEMPLATE')) { while (el && (el = el.previousElementSibling)) {
if (el.nodeName.toUpperCase() !== 'TEMPLATE') {
index++; index++;
} }
}
return index; return index;
} }

Loading…
Cancel
Save