I have setup a store where I am using SKU modifiers for colors.
So I entered colors like this "Red,Blue,Black" in the colors box in the admin. I added SKU modifiers like this "-Red,Blue,Black". When a user selects a different color in the color swatch, it's supposed to automatically select the colors in the drop down, but it doesn't because of a weird bug in the JS.
The selected values of the drop down is <option value="Red,-Red">Red</option>
I presume this is to tell the cart how to modify the SKU when added to the cart.
Well the JavaScript function "setcolorlisttoactiveitem" (built in ProductImageGallery.cs line #538 ends up comparing the value of
listColor == matchColor
Well list color after going through the "clean" function comes out as "redred" instead of just "red" since there is a second value there.
tmpS.Append(" if (lstColor == matchColor)\n"); //line #548 about
This leads to the drop down not being changed when it should.
A workaround might be to change the function cleansizecoloroption to only look at the left side of the comma to split on "," and then take the left side so that the clean operation only brings over that value.