再度、調べ直してみました。
前述の判断は、誤りでした。
「>」のクリックでは、発生しません。
「>>」のクリックでは、発生します。
そこで、htmlのselect文周りに原因があるようです。
ここにあるのかも
jquery.multiselect2side/js/jquery.multiselect2side.js
ということで、
「>>」の動作を「>」に合わせたら、うまくいくようです。
// CLICK ON OPTION
$(this).next().find('.ms2side__options').children().click(function () {
if (!$(this).hasClass("ms2side__hide")) {
if ($(this).hasClass("AddOne")) {
leftSel.find("option:selected").each(function(i, selected){
$(this).remove().appendTo(rightSel);
el.find("[value=" + $(selected).val() + "]").attr("selected", true).remove().appendTo(el);
});
}
else if ($(this).hasClass("AddAll")) { // ALL SELECTED
// changed
leftSel.children().each(function(i, selected){
$(this).remove().appendTo(rightSel);
el.find("[value=" + $(selected).val() + "]").attr("selected", true).remove().appendTo(el);
});
// leftSel.children().appendTo(rightSel);
// leftSel.children().remove();
// el.find('option').attr("selected", true);
// changed
// el.children().attr("selected", true); -- PROBLEM WITH OPTGROUP
}
else if ($(this).hasClass("RemoveOne")) {
rightSel.find("option:selected").each(function(i, selected){
$(this).remove().appendTo(leftSel);
el.find("[value=" + $(selected).val() + "]").attr("selected", false).remove().appendTo(el);
});
}
else if ($(this).hasClass("RemoveAll")) { // ALL REMOVED
// changed
rightSel.children().each(function(i, selected){
$(this).remove().appendTo(leftSel);
el.find("[value=" + $(selected).val() + "]").attr("selected", false).remove().appendTo(el);
});
// rightSel.children().appendTo(leftSel);
// rightSel.children().remove();
// el.find('option').attr("selected", false);
// changed
//el.children().attr("selected", false); -- PROBLEM WITH OPTGROUP
}
}