From ffddc48a24815f2b7176af2413d91905eaf3479a Mon Sep 17 00:00:00 2001 From: IliaFours Date: Tue, 22 Apr 2014 14:54:36 +0300 Subject: [PATCH] Recalculation dropdown height if dropdownAutoWidth is true --- select2.js | 1 + 1 file changed, 1 insertion(+) diff --git a/select2.js b/select2.js index ea175cf7..da4a348c 100644 --- a/select2.js +++ b/select2.js @@ -1248,6 +1248,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 {