From 492dccd1a559fe821b9b00a3e4f4504e8580ad16 Mon Sep 17 00:00:00 2001 From: creage Date: Sat, 16 Jun 2012 22:23:12 +0300 Subject: [PATCH] no need for style if we already have a sizer Signed-off-by: Igor Vaynberg --- select2.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/select2.js b/select2.js index 068c82c7..a8dc3d10 100755 --- a/select2.js +++ b/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 = $("
").css({ position: "absolute", left: "-1000px",