Setting the width explicitly in the initialization options seems to fix the problem on Irvin's example :
$('.chosen-select').chosen({ width: '200px' });
we had done this but using a css style. – JonH
I know.
Somehow, chosen
computes a length for the placeholder label, and assigns it in the label's markup, in the style
attribute.
I can't tell at what point in the internal rendering this length is computed, but from what the test shows :
- if you only have a css rule, the length is incorrect for the first display,
- if you pass the width as an explicit option, on the other hand, the length is correct.
My blind guess is : the select placeholder's width is read at a point where it has not yet reached its final value - maybe before it was inserted at its final place in the DOM, and hence before the css rule applies.