From a4ba9fd638079ca2c56463c9af76d2d225b56baa Mon Sep 17 00:00:00 2001 From: James Jensen Date: Thu, 14 Feb 2013 13:50:07 -0700 Subject: [PATCH 1/3] Removed extraneous comma IE7 doesn't deal well with extra commas at the end of javascript object initializers. --- src/jquery.maskedinput.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jquery.maskedinput.js b/src/jquery.maskedinput.js index 2228e8f..70747d6 100644 --- a/src/jquery.maskedinput.js +++ b/src/jquery.maskedinput.js @@ -19,7 +19,7 @@ $.mask = { '*': "[A-Za-z0-9]" }, dataName: "rawMaskFn", - placeholder: '_', + placeholder: '_' }; $.fn.extend({ From 949b2f74be43c0bae273bf1381d5d5047d2ed652 Mon Sep 17 00:00:00 2001 From: James Jensen Date: Thu, 14 Feb 2013 13:54:17 -0700 Subject: [PATCH 2/3] Declare "pos" as local variable This variable is set in the `for` loop on the next line. We should declare it locally to avoid setting a global variable. --- src/jquery.maskedinput.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/jquery.maskedinput.js b/src/jquery.maskedinput.js index 70747d6..9ad0052 100644 --- a/src/jquery.maskedinput.js +++ b/src/jquery.maskedinput.js @@ -244,7 +244,8 @@ $.fn.extend({ var test = input.val(), lastMatch = -1, i, - c; + c, + pos; for (i = 0, pos = 0; i < len; i++) { if (tests[i]) { From 8ac725a3872c6c5f983f5b07328a92b3a64a85b0 Mon Sep 17 00:00:00 2001 From: James Jensen Date: Thu, 14 Feb 2013 13:55:22 -0700 Subject: [PATCH 3/3] Removed unused variable --- src/jquery.maskedinput.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/jquery.maskedinput.js b/src/jquery.maskedinput.js index 9ad0052..749da65 100644 --- a/src/jquery.maskedinput.js +++ b/src/jquery.maskedinput.js @@ -293,8 +293,7 @@ $.fn.extend({ }) .bind("focus.mask", function() { clearTimeout(caretTimeoutId); - var pos, - moveCaret; + var pos; focusText = input.val(); pos = checkVal();