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

Merge pull request #444 from kevin-brown/master

Fixes 424: Improved Placeholder Detection
This commit is contained in:
Igor Vaynberg 2012-09-24 14:43:14 -07:00
commit 0c11ed7a9c

View File

@ -1587,7 +1587,7 @@
// single // single
initSelection: function () { initSelection: function () {
var selected; var selected;
if (this.opts.element.val() === "") { if (this.opts.element.val() === "" && this.opts.element.text() === "") {
this.close(); this.close();
this.setPlaceholder(); this.setPlaceholder();
} else { } else {
@ -1921,7 +1921,7 @@
// multi // multi
initSelection: function () { initSelection: function () {
var data; var data;
if (this.opts.element.val() === "") { if (this.opts.element.val() === "" && this.opts.element.text() === "") {
this.updateSelection([]); this.updateSelection([]);
this.close(); this.close();
// set the placeholder if necessary // set the placeholder if necessary