Skip to content

Commit 1fc0982

Browse files
committed
tweak dropdown position. fixes select2#228
1 parent 96c0166 commit 1fc0982

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

select2.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -828,8 +828,10 @@
828828

829829
this.dropdown.show();
830830
this.ensureHighlightVisible();
831-
this.focusSearch();
832831

832+
this.positionDropdown();
833+
834+
this.focusSearch();
833835
},
834836

835837
// abstract
@@ -997,7 +999,7 @@
997999
function postRender() {
9981000
results.scrollTop(0);
9991001
search.removeClass("select2-active");
1000-
self.positionDropdown();
1002+
if (initial !== true) self.positionDropdown();
10011003
}
10021004

10031005
function render(html) {
@@ -1010,9 +1012,6 @@
10101012
return;
10111013
}
10121014

1013-
// position dropdown before making a potentially long request
1014-
this.positionDropdown();
1015-
10161015
this.resultsPage = 1;
10171016
opts.query({
10181017
term: search.val(),

0 commit comments

Comments
 (0)