bootstrap-select icon indicating copy to clipboard operation
bootstrap-select copied to clipboard

Scrollbar on IE8 for long option names

Open amnesia7 opened this issue 13 years ago • 8 comments

The plugin fails to style the dropdown inner (ul) correctly on IE8 if there are options with long names, mine happen to be in optgroups if that makes any difference.

The scrollbar isn't shown but the list is scrollable via the mousewheel.

Col

amnesia7 avatar Nov 20 '13 12:11 amnesia7

Yep, same thing here though I'm not using optgroups.

bmeredyk avatar Nov 21 '13 16:11 bmeredyk

I tried for some time to make amendments to the css to make it work but failed....IE8 dev tools isn't the easiest to bug fix a css issue.

I got the scrollbar to appear by setting a fixed width on the ul inside the dropdown but ideally it shouldn't need this.

Col

amnesia7 avatar Nov 21 '13 18:11 amnesia7

The following seems to work on IE8 (and Chrome still works):

.bootstrap-select.btn-group .dropdown-menu.inner {
  float: none;
}

amnesia7 avatar Nov 22 '13 15:11 amnesia7

@amnesia7 Thank you that fixes it; well mostly. The scrollbar appears now in IE but the last (bottom) option or 2 is hidden as is the down arrow that would normally be at the bottom of a scrollbar. Looks like probably the height of the originating select widget worth is missing. Certainly better than before thought.

bmeredyk avatar Nov 22 '13 20:11 bmeredyk

I'm not quite sure why it uses a .dropdown-menu within another .dropdown-menu because I don't think that's the html that bootstrap uses to lay out dropdowns.

Col

amnesia7 avatar Nov 22 '13 22:11 amnesia7

Can you give an example of the code you're using? What is the width option set to?

caseyjhol avatar Dec 12 '13 07:12 caseyjhol

I set the width as 400px to allow for the width of the long option names. I haven't got a particular example at present but have you tried just setting up a select box that has long option names?

amnesia7 avatar Dec 12 '13 17:12 amnesia7

I had the same problem - seems to occur when option names are longer than the width of the dropdown. Gave the .dropdown-menu.inner a fixed width to fix this.

electricsheep avatar Feb 05 '14 11:02 electricsheep