Prerequisites
Steps to reproduce the issue
- Enable tagging (
tags:true), and do not close the drop-down on select/deselect actions (closeOnSelect:false).
- Add and remove (select/deselect) choices to make the tags area change height.
- When the tags area changes height, the drop-down element is not repositioned accordingly.
Expected behavior and actual behavior
The drop-down element should be repositioned when the tags area changes size.
Here is a tagged selection area with a few tags already selected:

This is what happens when one or more tags are selected and the tags area changes size (in this case, gets taller):

The newly selected choices have been added to the tags area, but their tags are hidden behind the drop-down element. The drop-down element is not repositioned (in this case, lowered) to expose the added tags.
Work-Around
I used a work-around, catching the "change" event and forcing a resize of the drop-down element:
// Force drop-down list to resize upon select/unselect
select2Elem.on("change",
function(evt) {
select2Elem.resize();
}
);
Environment
Any browser.
Any O/S.
External Links
The same bug was reported on StackOverflow at: http://stackoverflow.com/questions/37198185
Prerequisites
masterbranch of Select2 (4.0.2) - UnknownSteps to reproduce the issue
tags:true), and do not close the drop-down on select/deselect actions (closeOnSelect:false).Expected behavior and actual behavior
The drop-down element should be repositioned when the tags area changes size.
Here is a tagged selection area with a few tags already selected:
This is what happens when one or more tags are selected and the tags area changes size (in this case, gets taller):
The newly selected choices have been added to the tags area, but their tags are hidden behind the drop-down element. The drop-down element is not repositioned (in this case, lowered) to expose the added tags.
Work-Around
I used a work-around, catching the
"change"event and forcing a resize of the drop-down element:Environment
Any browser.
Any O/S.
External Links
The same bug was reported on StackOverflow at: http://stackoverflow.com/questions/37198185