Browse Source

take the outerwidth of the element when sizing so we include padding and border. fixes #213

Igor Vaynberg 13 years ago
parent
commit
2c0344a520
1 changed files with 1 additions and 1 deletions
  1. 1 1
      select2.js

+ 1 - 1
select2.js

@@ -1070,7 +1070,7 @@
             if (style.indexOf("%") > 0) return style;
 
             // finally, fallback on the calculated width of the element
-            return (this.opts.element.width() === 0 ? 'auto' : this.opts.element.width() + 'px');
+            return (this.opts.element.width() === 0 ? 'auto' : this.opts.element.outerWidth() + 'px');
         }
     });