diff --git a/select2.js b/select2.js index a0bc540d..b7bd4b42 100644 --- a/select2.js +++ b/select2.js @@ -1251,6 +1251,7 @@ the specific language governing permissions and limitations under the Apache Lic // Add scrollbar width to dropdown if vertical scrollbar is present dropWidth = $dropdown.outerWidth(false) + (resultsListNode.scrollHeight === resultsListNode.clientHeight ? 0 : scrollBarDimensions.width); dropWidth > width ? width = dropWidth : dropWidth = width; + dropHeight = $dropdown.outerHeight(false); enoughRoomOnRight = dropLeft + dropWidth <= viewPortRight; } else {