-
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
Chosen does not get rendered when using toggling visiblity of parent #444
Conversation
… and/or adjusting the width of parent-container (width of chosen is queried and set on demand)
Hi, I merged this locally and the script has a slight error: When you call the functions set_dropdown_width and set_search_field_width in the "mousedown" function, the functions aren't found. You're missing a "this." Just thought I'd let you know! Great job otherwise, you saved my day ! |
Hey ... thanks! I've fixed my code and updated my request! thanks a lot! |
I found providing a width to the original select box fixes the issue |
Only if you go for a fixed-width aka |
I had the same problem, i fixed it by changing the order of tabs and chosen plugin. |
@irfandar as mentioned before: the problem is that the width of the box is calculated on init. if the box is not visible at this moment (eg in another tab), the layout gets broken. and no, reordering the ui is not an option! it's not my ui that's broken, it's chosen ... sry |
@dittodhole if you apply chosen before applying jquery tabs it will work fine because if tabs are not applied than select is visible and chosen works properly. |
@irfandar that's another workaround, but not the real solution. what if the style of your container/style, which gets added after |
@dittodhole As documented in the readme, you have to implement the same change in the Prototype version, otherwise @pfiller will reject it |
thanks @stof ... will add a Prototype-translation ...! |
It looks as though this has been fixed by this PR #1141. Closing. |
Not fixed - still have this issue 2 years later! |
@StevenHB This is free, open source code. Please provide more than just a complaint. |
Sorry, I noticed this had been closed and the issue is still occurring from the latest build |
There is currently an open issue here. If you can provide more insight on a possible solution, we (and a lot of others) would be grateful. |
What I have is Chosen within tabs, it chooses to make the container div width to 0. |
Currently I was using tabs with jQuery, and a chosen-box was placed in a tab.
Unfortunately when the chosen-box, if not placed in the initial visible tab, gets visible (by changing the tab), the width is fukced up.
Therefore I've introduced a new init-parameter (options.width) which could be used eg:
The widths of the search-container and search-field get set on-demand (on showing the container)