Skip to content

Commit a6eeadb

Browse files
committed
always detach and append the dropdown on open. this ensures it will be the last element in body and thus have the highest z-index. issue select2#105. issue select2#84
1 parent b18db15 commit a6eeadb

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

select2.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,6 @@
389389

390390
this.results = results = this.container.find(resultsSelector);
391391
this.search = search = this.container.find("input[type=text]");
392-
this.dropdown.detach().appendTo('body');
393392

394393
this.resultsPage = 0;
395394
this.context = null;
@@ -695,7 +694,7 @@
695694
if (this.opened()) return;
696695

697696
this.container.addClass("select2-dropdown-open").addClass("select2-container-active");
698-
this.dropdown.addClass("select2-drop-active");
697+
this.dropdown.detach().appendTo('body').addClass("select2-drop-active");
699698

700699
this.updatePositions();
701700

0 commit comments

Comments
 (0)