Explorar o código

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

Igor Vaynberg %!s(int64=13) %!d(string=hai) anos
pai
achega
2c0344a520
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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');
         }
     });