Browse Source

Don't join class names when removing classes after additions.

pull/296/head
Bogdan Mustiata 10 years ago
parent
commit
c7257ae198
  1. 5
      Sortable.js

5
Sortable.js

@ -896,7 +896,10 @@
el.classList[state ? 'add' : 'remove'](name);
}
else {
var className = (' ' + el.className + ' ').replace(/\s+/g, ' ').replace(' ' + name + ' ', '');
var className = (' ' + el.className + ' ')
.replace(/\s+/g, ' ')
.replace(' ' + name + ' ', ' ')
.replace(/ /, ' ');
el.className = className + (state ? ' ' + name : '');
}
}

Loading…
Cancel
Save