Browse Source

clearSelection undefined fix

Robin Herbots 12 years ago
parent
commit
ca626e4f6f

+ 1 - 1
build.properties

@@ -7,7 +7,7 @@ distdir = dist
 
 build.major = 2
 build.minor = 2
-build.revision = 53
+build.revision = 54
 
 target = jquery.inputmask.bundle.js
 target.min = jquery.inputmask.bundle.min.js

+ 1 - 1
component.json

@@ -1,6 +1,6 @@
 {
     "name": "jquery.inputmask",
-    "version": "2.2.53",
+    "version": "2.2.54",
     "main": "./dist/jquery.inputmask.bundle.js",
     "dependencies": {
         "jquery": ">=1.5"

BIN
dist/jQuery.InputMask.2.2.53.nupkg


BIN
dist/jQuery.InputMask.2.2.54.nupkg


+ 7 - 6
dist/jquery.inputmask.bundle.js

@@ -3,7 +3,7 @@
 * http://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2013 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 2.2.53
+* Version: 2.2.54
 */
 
 (function ($) {
@@ -1359,7 +1359,7 @@
                                                     if (firstUnmaskedPosition <= p && (getActiveMaskSet()['greedy'] || (buffer.length < maskL || getBufferElement(buffer, p) == getPlaceHolder(p)))) {
                                                         if (buffer[firstMaskPos] != getPlaceHolder(firstMaskPos) && buffer.length < maskL) {
                                                             var offset = prepareBuffer(buffer, -1, isRTL);
-                                                            if ((clearSelection ? pos.begin : pos.end) != 0) p = p + offset;
+                                                            if ((isSelection ? pos.begin : pos.end) != 0) p = p + offset;
                                                             maskL = buffer.length;
                                                         }
                                                         shiftL(firstUnmaskedPosition, p, c);
@@ -1401,6 +1401,7 @@
                                     });
                                 }
 
+                                console.log(getActiveMaskSet()["p"]);
                                 if (strict !== true) determineActiveMasksetIndex(isRTL);
                                 if (writeOut !== false) {
                                     $.each(results, function (ndx, rslt) {
@@ -1455,7 +1456,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2013 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 2.2.53
+Version: 2.2.54
 
 Optional extensions on the jquery.inputmask base
 */
@@ -1557,7 +1558,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2012 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 2.2.53
+Version: 2.2.54
 
 Optional extensions on the jquery.inputmask base
 */
@@ -2026,7 +2027,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2013 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 2.2.53
+Version: 2.2.54
 
 Optional extensions on the jquery.inputmask base
 */
@@ -2188,7 +2189,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2013 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 2.2.53
+Version: 2.2.54
 
 Regex extensions on the jquery.inputmask base
 Allows for using regular expressions as a mask

File diff suppressed because it is too large
+ 15 - 15
dist/jquery.inputmask.bundle.min.js


File diff suppressed because it is too large
+ 15 - 15
dist/min/jquery.inputmask.js


+ 1 - 1
jquery.inputmask.jquery.json

@@ -8,7 +8,7 @@
 		"inputmask",
 		"mask"
     ],
-    "version": "2.2.53",
+    "version": "2.2.54",
     "author": {
         "name": "Robin Herbots",
         "url": "http://github.com/RobinHerbots/jquery.inputmask"

+ 2 - 1
js/jquery.inputmask.js

@@ -1359,7 +1359,7 @@
                                                     if (firstUnmaskedPosition <= p && (getActiveMaskSet()['greedy'] || (buffer.length < maskL || getBufferElement(buffer, p) == getPlaceHolder(p)))) {
                                                         if (buffer[firstMaskPos] != getPlaceHolder(firstMaskPos) && buffer.length < maskL) {
                                                             var offset = prepareBuffer(buffer, -1, isRTL);
-                                                            if ((clearSelection ? pos.begin : pos.end) != 0) p = p + offset;
+                                                            if ((isSelection ? pos.begin : pos.end) != 0) p = p + offset;
                                                             maskL = buffer.length;
                                                         }
                                                         shiftL(firstUnmaskedPosition, p, c);
@@ -1401,6 +1401,7 @@
                                     });
                                 }
 
+                                console.log(getActiveMaskSet()["p"]);
                                 if (strict !== true) determineActiveMasksetIndex(isRTL);
                                 if (writeOut !== false) {
                                     $.each(results, function (ndx, rslt) {