New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Width Problem #1162
Comments
Are you using the latest version of Chosen ? And which browser are you using ? And which version of Chosen (jQuery or Prototype) ? |
Sorry for forgetting all this - was a bit in a hurry! |
There isn't a great way to rely on style / css for getting the user-defined width (modern browsers return the actual width instead) which means that Chosen automatically ends up with a pixel value. We don't want to be forced to do a re-calculation on screen resize, so we provided an optional interface for percentage widths. $('#inputNewRecipient').chosen({ width: '65.9574%' }); |
@pfiller I am now using the chosen interface to set the width. Now my placeholder text got cut off by the generated width: 55px, is this an issue with chosen? |
Chosen will make the input field as big as it can within its container. Sometimes that means the placeholder text gets cut off. If you want the text to fit in Chosen, you need to make Chosen at least that big. I did notice a small issue while investigating this. Basically, the field can be allowed to grow larger than the container in certain cases. See: #1167 |
The Box was around 600px wide and the placeholder text got cut off after around 6-7 letters. |
Had similar issue also: li.search-field{ |
This fixed the issue for me li.search-field{ |
Hi, when I use chosen on a select field like this:
<select id="mySelect" style="width: 65.935%;" multiple>
Chosen generated the
<ul class="chzn-choices">
with a width of 65.935 pixels instead of percent. For the moment I've hacked it with this initialization here$('#inputNewRecipient').chosen().next().css('width', '65.9574%');
Kind regards
The text was updated successfully, but these errors were encountered: