Browse Source

no need for style if we already have a sizer

Signed-off-by: Igor Vaynberg <[email protected]>
creage 13 years ago
parent
commit
492dccd1a5
1 changed files with 2 additions and 2 deletions
  1. 2 2
      select2.js

+ 2 - 2
select2.js

@@ -201,9 +201,9 @@
         event.stopPropagation();
     }
 
-    function measureTextWidth(e) {
-        var style = e.currentStyle || window.getComputedStyle(e, null);
+    function measureTextWidth(e) {        
         if (!sizer){
+        	var style = e.currentStyle || window.getComputedStyle(e, null);
         	sizer = $("<div></div>").css({
 	            position: "absolute",
 	            left: "-1000px",