فهرست منبع

Update select2.js

Adding case to fix placeholder not being displayed when element not visible.
Chris Rueber 12 سال پیش
والد
کامیت
86952b4ed9
1فایلهای تغییر یافته به همراه5 افزوده شده و 0 حذف شده
  1. 5 0
      select2.js

+ 5 - 0
select2.js

@@ -2210,6 +2210,11 @@ the specific language governing permissions and limitations under the Apache Lic
             if (searchWidth < 40) {
                 searchWidth = maxWidth - sideBorderPadding;
             }
+            
+            if (searchWidth <= 0) {
+              searchWidth = minimumWidth
+            }
+            
             this.search.width(searchWidth);
         },