diff --git a/select2.js b/select2.js index 4dd6d6c0..2f18fd05 100644 --- a/select2.js +++ b/select2.js @@ -1473,14 +1473,6 @@ the specific language governing permissions and limitations under the Apache Lic // abstract getPlaceholder: function () { - - // if a placeholder is specified on a select without the first empty option ignore it - if (this.select) { - if (this.select.find("option").first().text() !== "") { - return undefined; - } - } - return this.opts.element.attr("placeholder") || this.opts.element.attr("data-placeholder") || // jquery 1.4 compat this.opts.element.data("placeholder") || @@ -1807,6 +1799,18 @@ the specific language governing permissions and limitations under the Apache Lic return opts; }, + // single + getPlaceholder: function() { + // if a placeholder is specified on a single select without the first empty option ignore it + if (this.select) { + if (this.select.find("option").first().text() !== "") { + return undefined; + } + } + + return this.parent.getPlaceholder.apply(this, arguments); + }, + // single setPlaceholder: function () { var placeholder = this.getPlaceholder();