-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Closed
Description
Now search input width calculate as parent innerWidth()
:
if (this.$search.attr('placeholder') !== '') {
width = this.$selection.find('.select2-selection__rendered').innerWidth();
This is wrong, because ul.select2-selection__rendered
has left&right padding.
So search input makes select2 container grows up.
To fix that it just need to calculate width by width()
, that not count paddings.
JS fiddle: https://jsfiddle.net/karakum/2o6xzupe/