فهرست منبع

Merge pull request #1723 from AlexanderZaytsev/master

Use more specific selector for finding options of a select
Igor Vaynberg 11 سال پیش
والد
کامیت
c73261be21
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      select2.js

+ 1 - 1
select2.js

@@ -1708,7 +1708,7 @@ the specific language governing permissions and limitations under the Apache Lic
         // abstract
         getPlaceholderOption: function() {
             if (this.select) {
-                var firstOption = this.select.children().first();
+                var firstOption = this.select.children('option').first();
                 if (this.opts.placeholderOption !== undefined ) {
                     //Determine the placeholder option based on the specified placeholderOption setting
                     return (this.opts.placeholderOption === "first" && firstOption) ||