1
0
mirror of synced 2024-11-29 16:16:02 +03:00

Merge pull request #2215 from pineapple-thief/pineapple-thief

Update select2.js
This commit is contained in:
Kevin Brown 2014-03-29 14:09:29 -04:00
commit 901a5994c3

View File

@ -1806,7 +1806,7 @@ the specific language governing permissions and limitations under the Apache Lic
//Determine the placeholder option based on the specified placeholderOption setting
return (this.opts.placeholderOption === "first" && firstOption) ||
(typeof this.opts.placeholderOption === "function" && this.opts.placeholderOption(this.select));
} else if (firstOption.text() === "" && firstOption.val() === "") {
} else if ($.trim(firstOption.text()) === "" && firstOption.val() === "") {
//No explicit placeholder option specified, use the first if it's blank
return firstOption;
}