This is with Select2 3.4.5.
jsFiddle: http://jsfiddle.net/vx2mX/
Description:
In Chrome (32.0.1), if I reinitialize a select2 like so:
$("#select2").select2({
data : [{id:0,text:"red"},{id:1,text:"blue"},{id:2,text:"green"}],
placeholder : "e.g., colourName"
});
This adds display:inline-block directly to the select2-container div's inline style, which matches what is defined for select2-container in its CSS. Accordingly, whatever layout it had previously, remains.
However, when I do the same on FF (26), it adds display:inline directly to the select2-container div's inline style, which appears to give it {width:100%} and forces it to drop down a line.
EDIT:
Tested with Select2 3.4.3 and the same behaviour occurs in FF. However, in Chrome, display:inline-block is not added directly to the select2-container div's inline style. The inline style remains empty.
This is with Select2 3.4.5.
jsFiddle: http://jsfiddle.net/vx2mX/
Description:
In Chrome (32.0.1), if I reinitialize a select2 like so:
This adds
display:inline-blockdirectly to theselect2-containerdiv's inline style, which matches what is defined forselect2-containerin its CSS. Accordingly, whatever layout it had previously, remains.However, when I do the same on FF (26), it adds
display:inlinedirectly to theselect2-containerdiv's inline style, which appears to give it{width:100%}and forces it to drop down a line.EDIT:
Tested with Select2 3.4.3 and the same behaviour occurs in FF. However, in Chrome,
display:inline-blockis not added directly to theselect2-containerdiv's inline style. The inline style remains empty.