I have an asp.net listbox and I'm using the jquery chosen plugin. The data-placeholder value doesn't seem to always work with list boxes. For instance see the image:
Notice the list box for Region
it says "Select Re" then it stops...its quite random look at the list box for city that works fine. But look at the list box for country it is supposed to say Select Country...
but it shows Select Country..
(missing the last period). My listbox control's asp.net markup is as such:
<asp:ListBox ID="lbRegion" AutoPostBack="true" runat="server" class="chosen-select"
data-placeholder="Select Region..." SelectionMode="Multiple"
OnSelectedIndexChanged="lbRegion_OnSelectedIndexChanged" ToolTip="Select Region...">
</asp:ListBox>
I've tried re-creating it, etc...but to no avail. What gives?
Here's my jquery that includes the class for chosen:
$(".chosen-select").chosen({
search_contains: true,
no_results_text: "Oops, nothing found!",
allow_single_deselect: true
});
$('.chosen-container').css('width', '200px');
Issue about Select Country..
reproduced here: http://jsfiddle.net/D3FUc/, I'll search deeply the reason why of the issue.
The only woraround I found is to override the specific container class like:
li.search-field {
width: 100%;
}
li.search-field input.default {
width: auto !important;
}
Issue: https://github.com/harvesthq/chosen/issues/1162#issuecomment-30229366
Demo: http://jsfiddle.net/D3FUc/1/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With