-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Default text for multiple select is being truncated #2480
Comments
What browser, browser version, OS, and OS version are you using? And what version of Chosen? If not the latest version, does it still happen on the latest version? Additionally, please link to a publicly accessible page (or a Fiddle) that shows the issue so we can attempt to reproduce. Closing until more info is provided, then we'll reopen. |
/cc @mlettini |
@tjschuck the width on that |
Hi @tjschuck I'm really sorry that I didn't give enough information, I think it happens when jquery chosen is calling inside bootstrap modal. this is my fiddle link. browser: Chrome 47.0.2526.73 (64-bit) Cheers |
@tongtoanbs Thanks for following up -- reopened! |
And cc: @mlettini again — Fiddle provided. |
@tjschuck @tongtoanbs Thanks for the fiddle! This does indeed look to be a bug, and @tongtoanbs is probably correct that it has something to do with bootstrap. The issue is in JS and not CSS. That input is given a width from the JS, and the width is not long enough when the modal first opens.
I'm not even sure why we need an explicit width at first. |
Hi @mlettini if I don't pass that option then the chosen dropdown won't showing up for me. fiddle link |
@tongtoanbs I don't think it's anything you're doing. If you look at the input inside of the 0px-width chosen dropdown in your second fiddle, you can still see the bug of the input being 90px when it should be bigger. |
I stumbled on this issue while implementing chosen() on a dynamically created form for my webapp. There the placeholder text was truncated as above. Since there was no progress to this ticket in a whole year, I started to fiddle around for myself. In
to
replacing the initial width from 25px with 100%. Further I removed the call to While testing the chosen() Field ran perfectly well for me on Firefox and Chrome. Maybe some Dev can do a more extensive testing of this solution to finally solve this ticket. |
I have stumbled upon this issue as well. https://codepen.io/jellisii/pen/vgQeqz?editors=1111 In this particular instance, you'll notice that I have the width to 100%, which sidesteps the problem of when chosen is rendered while hidden, but still does have the placeholder being short. |
Had the same problem after showing the select box (hidden by default). Just run |
This was fixed in #2880 and has been released as part of version 1.8.1. |
I'm using bootstrap and this is my html code:
The default text is being truncated
but after I clicked to the dropdown and click away, it back to normal
The text was updated successfully, but these errors were encountered: