Explorar el Código

no need for style if we already have a sizer

Signed-off-by: Igor Vaynberg <[email protected]>
creage hace 13 años
padre
commit
492dccd1a5
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  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",