浏览代码

Merge pull request #183 from ryfeng/master

Default to width: auto instead of width: 0px when styling select2-container
Igor Vaynberg 13 年之前
父节点
当前提交
cb72651787
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      select2.js

+ 1 - 1
select2.js

@@ -1033,7 +1033,7 @@
                         return matches[1];
                 }
             }
-            return this.opts.element.width() + 'px';
+            return (this.opts.element.width() === 0 ? 'auto' : this.opts.element.width() + 'px');
         }
     });