Browse Source

fix overwrite mode with numericInput

Robin Herbots 11 years ago
parent
commit
ab89836739

+ 1 - 1
bower.json

@@ -1,6 +1,6 @@
 {
     "name": "jquery.inputmask",
-    "version": "3.0.40",
+    "version": "3.0.41",
     "main": "./dist/jquery.inputmask.bundle.js",
 	"keywords" : ["jQuery", "plugins", "input", "form", "inputmask", "mask"],
 	"description": "jquery.inputmask is a jquery plugin which create an input mask.",

+ 1 - 1
build.properties

@@ -7,7 +7,7 @@ distdir = dist
 
 build.major = 3
 build.minor = 0
-build.revision = 40
+build.revision = 41
 
 target = jquery.inputmask.bundle.js
 target.min = jquery.inputmask.bundle.min.js

BIN
dist/jQuery.InputMask.3.0.40.nupkg


+ 9 - 9
dist/jquery.inputmask.bundle.js

@@ -3,7 +3,7 @@
 * http://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2014 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.0.40
+* Version: 3.0.41
 */
 
 (function ($) {
@@ -1042,7 +1042,7 @@
                     } else if (k == opts.keyCode.LEFT) {
                         setTimeout(function () {
                             var caretPos = caret(input);
-                            caret(input, caretPos.begin - 1);
+                            caret(input, isRTL ? caretPos.begin + 1 : caretPos.begin - 1);
                         }, 0);
                     }
                 }
@@ -1099,7 +1099,7 @@
                         }
 
                         getMaskSet()["writeOutBuffer"] = true;
-                        var p = pos.begin;
+                        var p = isRTL && !isSlctn ? pos.end : pos.begin;
                         var valResult = isValid(p, c, strict);
                         if (valResult !== false) {
                             if (valResult !== true) {
@@ -1678,7 +1678,7 @@
 * http://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2014 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.0.40
+* Version: 3.0.41
 */
 
 (function ($) {
@@ -2043,7 +2043,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2014 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 3.0.40
+Version: 3.0.41
 
 Optional extensions on the jquery.inputmask base
 */
@@ -2164,7 +2164,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2014 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 3.0.40
+Version: 3.0.41
 
 Optional extensions on the jquery.inputmask base
 */
@@ -2627,7 +2627,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2014 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 3.0.40
+Version: 3.0.41
 
 Optional extensions on the jquery.inputmask base
 */
@@ -2823,7 +2823,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2014 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 3.0.40
+Version: 3.0.41
 
 Regex extensions on the jquery.inputmask base
 Allows for using regular expressions as a mask
@@ -3010,7 +3010,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2014 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 3.0.40
+Version: 3.0.41
 
 Phone extension.
 When using this extension make sure you specify the correct url to get the masks

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


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


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


+ 1 - 1
jquery.inputmask.jquery.json

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

+ 2 - 2
js/jquery.inputmask.js

@@ -1042,7 +1042,7 @@
                     } else if (k == opts.keyCode.LEFT) {
                         setTimeout(function () {
                             var caretPos = caret(input);
-                            caret(input, caretPos.begin - 1);
+                            caret(input, isRTL ? caretPos.begin + 1 : caretPos.begin - 1);
                         }, 0);
                     }
                 }
@@ -1099,7 +1099,7 @@
                         }
 
                         getMaskSet()["writeOutBuffer"] = true;
-                        var p = pos.begin;
+                        var p = isRTL && !isSlctn ? pos.end : pos.begin;
                         var valResult = isValid(p, c, strict);
                         if (valResult !== false) {
                             if (valResult !== true) {