浏览代码

Merge pull request #632 from crueber/patch-1

Update select2.js
Igor Vaynberg 12 年之前
父节点
当前提交
c135db876e
共有 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);
         },