Skip to content

Commit afd3537

Browse files
committed
allow opts.dropdownCss to override css even after position. fixes select2#328
1 parent 7b60524 commit afd3537

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

select2.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@
359359
query.callback({results: data});
360360
return;
361361
}
362-
362+
363363
process = function(datum, collection) {
364364
var group;
365365
datum = datum[0];
@@ -375,7 +375,7 @@
375375
}
376376
}
377377
};
378-
378+
379379
$(data).each2(function(i, datum) { process(datum, filtered.results); });
380380
query.callback(filtered);
381381
};
@@ -967,8 +967,6 @@
967967

968968
if (this.search.val() === " ") { this.search.val(""); }
969969

970-
this.dropdown.css(evaluate(this.opts.dropdownCss));
971-
this.dropdown.addClass("select2-drop-active");
972970
this.container.addClass("select2-dropdown-open").addClass("select2-container-active");
973971

974972
this.updateResults(true);
@@ -978,9 +976,12 @@
978976
}
979977

980978
this.dropdown.show();
981-
this.ensureHighlightVisible();
982979

983980
this.positionDropdown();
981+
this.dropdown.css(evaluate(this.opts.dropdownCss));
982+
this.dropdown.addClass("select2-drop-active");
983+
984+
this.ensureHighlightVisible();
984985

985986
this.focusSearch();
986987
},

0 commit comments

Comments
 (0)