From 6bef0b5bf64a893d5ad2c8cd9eeea62bd99dd8e0 Mon Sep 17 00:00:00 2001 From: Igor Vaynberg Date: Fri, 30 Mar 2012 13:04:32 -0700 Subject: [PATCH] fix placeholder styling broken in a previous code cleanup. closes #12 --- select2.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/select2.js b/select2.js index d2fe975c..efa86190 100755 --- a/select2.js +++ b/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(); }