if (item.selecting) {
classList.remove(el, o.classes.selecting);
item.selecting = false;
if (cmd && item.startselected) {
classList.add(el, o.classes.selected);
item.selected = true;
} else {
if (item.startselected && !o.toggle) {
classList.add(el, o.classes.deselecting);
item.deselecting = true;
}
}
}
if (el.selected) {
if (!cmd) {
if (!item.startselected) {
classList.remove(el, o.classes.selected);
item.selected = false;
classList.add(el, o.classes.deselecting);
item.deselecting = true;
}
}
}
I don't think this check for el.selected is correct; I believe it should be item.selected. el would be the DOM element, which doesn't appear to ever get .selected set on it.
https://github.com/Mobius1/Selectable/blob/0.19.0/selectable.js#L1707
I don't think this check for
el.selected
is correct; I believe it should beitem.selected
.el
would be the DOM element, which doesn't appear to ever get.selected
set on it.