Browse Source

fix index calculation to skip templates

pull/242/head
Markus Ast 10 years ago
parent
commit
5325c8a842
  1. 6
      Sortable.js

6
Sortable.js

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

Loading…
Cancel
Save