select2-bootstrap-theme icon indicating copy to clipboard operation
select2-bootstrap-theme copied to clipboard

Placeholder beeing cut off?

Open WalhallaS2 opened this issue 7 years ago • 3 comments

Hello,

I stumbled on an issue during a project build-up. The placeholder on a multiselect is beeing cut off. Please have a look on the following screenshot:

select2bs

To reproduce this easily, I did create the following JSFiddle: https://jsfiddle.net/f2gxy3sk/

Please have a look.

Thank you!

WalhallaS2 avatar Feb 07 '18 12:02 WalhallaS2

Hi. I think this is a known issue since 2012 when select2 with multiselect is initialized inside a hidden element. Here's a pull request but still not in master yet: https://github.com/select2/select2/pull/4898 There's also a temporary way to fix it using css:

.select2-container .select2-selection.select2-selection--multiple .select2-search.select2-search--inline .select2-search__field:not([placeholder='']) { width: 100% !important; margin-right: 100000px; }

caohanh1502 avatar Mar 29 '18 05:03 caohanh1502

.select2-container .select2-selection__rendered > *:first-child.select2-search--inline { width: 100% !important; } .select2-container .select2-selection__rendered > *:first-child.select2-search--inline .select2-search__field { width: 100% !important; }

xander-mu avatar Jul 28 '18 00:07 xander-mu

I used that way: https://github.com/select2/select2/issues/4323#issuecomment-223440515

phaelmoraes avatar Aug 21 '19 12:08 phaelmoraes