Explorar o código

fix placeholder styling broken in a previous code cleanup. closes #12

Igor Vaynberg %!s(int64=13) %!d(string=hai) anos
pai
achega
6bef0b5bf6
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  1. 4 2
      select2.js

+ 4 - 2
select2.js

@@ -770,8 +770,10 @@
     SingleSelect2.prototype.updateSelection = function (data) {
         this.selection
             .find("span")
-            .html(this.opts.formatSelection(data))
-            .removeClass("select2-default");
+            .html(this.opts.formatSelection(data));
+
+        this.selection.removeClass("select2-default");
+
         if (this.opts.allowClear && this.getPlaceholder() !== undefined) {
             this.selection.find("abbr").show();
         }