From 1fc09825ed12788fe662377b72bdcd975f63729d Mon Sep 17 00:00:00 2001 From: Igor Vaynberg Date: Thu, 19 Jul 2012 11:08:09 +0300 Subject: [PATCH] tweak dropdown position. fixes #228 --- select2.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/select2.js b/select2.js index 886f2d82..0ca4ef60 100755 --- a/select2.js +++ b/select2.js @@ -828,8 +828,10 @@ this.dropdown.show(); this.ensureHighlightVisible(); - this.focusSearch(); + this.positionDropdown(); + + this.focusSearch(); }, // abstract @@ -997,7 +999,7 @@ function postRender() { results.scrollTop(0); search.removeClass("select2-active"); - self.positionDropdown(); + if (initial !== true) self.positionDropdown(); } function render(html) { @@ -1010,9 +1012,6 @@ return; } - // position dropdown before making a potentially long request - this.positionDropdown(); - this.resultsPage = 1; opts.query({ term: search.val(),