Procházet zdrojové kódy

no need for style if we already have a sizer

Signed-off-by: Igor Vaynberg <[email protected]>
creage před 13 roky
rodič
revize
492dccd1a5
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      select2.js

+ 2 - 2
select2.js

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