From 095cdda05e8f53b9b77abc1956fad588e2afd3e8 Mon Sep 17 00:00:00 2001 From: Igor Vaynberg Date: Thu, 26 Apr 2012 19:17:34 -0700 Subject: [PATCH] realign dropdown when search box moves to new line. closes #43 --- select2.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/select2.js b/select2.js index bafb8da3..8fb9782f 100755 --- a/select2.js +++ b/select2.js @@ -1237,7 +1237,6 @@ this.addSelectedChoice(data); if (this.select) { this.postprocessResults(); } - if (this.opts.closeOnSelect) { this.close(); this.search.width(10); @@ -1356,6 +1355,9 @@ searchWidth = maxWidth - getSideBorderPadding(this.search); } this.search.width(searchWidth); + + // in case the search box was pushed to the next line realign the dropdown + if (this.opened()) { this.alignDropdown(); } }, getVal: function () {