Kaynağa Gözat

Update select2.js

Adding case to fix placeholder not being displayed when element not visible.
Chris Rueber 12 yıl önce
ebeveyn
işleme
86952b4ed9
1 değiştirilmiş dosya ile 5 ekleme ve 0 silme
  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) {
             if (searchWidth < 40) {
                 searchWidth = maxWidth - sideBorderPadding;
                 searchWidth = maxWidth - sideBorderPadding;
             }
             }
+            
+            if (searchWidth <= 0) {
+              searchWidth = minimumWidth
+            }
+            
             this.search.width(searchWidth);
             this.search.width(searchWidth);
         },
         },