1
0
mirror of synced 2024-11-30 00:26:03 +03:00

reapply styles specified in dropdownCss option when dropdown is opened to ensure they do not get removed. fixes #305

This commit is contained in:
Igor Vaynberg 2012-08-07 08:44:25 -07:00
parent 220e50fd92
commit e7dee23c08

View File

@ -497,7 +497,6 @@
this.container.data("select2", this); this.container.data("select2", this);
this.dropdown = this.container.find(".select2-drop"); this.dropdown = this.container.find(".select2-drop");
this.dropdown.css(evaluate(opts.dropdownCss));
this.dropdown.addClass(evaluate(opts.dropdownCssClass)); this.dropdown.addClass(evaluate(opts.dropdownCssClass));
this.dropdown.data("select2", this); this.dropdown.data("select2", this);
@ -886,6 +885,7 @@
if (this.search.val() === " ") { this.search.val(""); } if (this.search.val() === " ") { this.search.val(""); }
this.dropdown.css(evaluate(this.opts.dropdownCss));
this.dropdown.addClass("select2-drop-active"); this.dropdown.addClass("select2-drop-active");
this.container.addClass("select2-dropdown-open").addClass("select2-container-active"); this.container.addClass("select2-dropdown-open").addClass("select2-container-active");