I am facing an issue with a list of phone accessories where the combination of material number and name is too long, causing it to exceed the width of the listbox (Html.ListBoxFor).
My solution was to add horizontal scroll to the list by using the overflow property. Initially, I tried implementing this within the element itself in Chrome, but then decided to add it directly in the code.
@Html.ListBoxFor(model => model.myId, MyModel, new { @id = "my-id :)", @class = "form-control input-md", @size = 9, @style="overflow: auto;"})
The horizontal scroll worked perfectly as planned, until I selected an item. The selected item was cut off at the edge of the original listbox.
You can view the problem in action on this fiddle: https://jsfiddle.net/yf0cgm9x/. When long names are selected, they get truncated.
Has anyone encountered a similar issue before?