浏览代码

InputMask remove a 0 in left side. (numericInput: true) fix #1238

Robin Herbots 9 年之前
父节点
当前提交
a82d407871

+ 1 - 0
CHANGELOG.md

@@ -15,6 +15,7 @@ All notable changes to this project will be documented in this file.
 - patchValueProperty - enable native value property patch on IE10/IE11
 
 ### Fixed
+- InputMask remove a 0 in left side. (numericInput: true) #1238
 - validate regular expression for indian vehicle registration number #1223
 - Distinguish empty value and '$ 0.00' value for currency alias #1053
 - 'alias': 'numeric', zero value #1221

+ 1 - 1
bower.json

@@ -1,6 +1,6 @@
 {
   "name": "jquery.inputmask",
-  "version": "3.2.8-36",
+  "version": "3.2.8-37",
   "main": [
     "./dist/inputmask/inputmask.js"
   ],

+ 1 - 1
component.json

@@ -2,7 +2,7 @@
   "name": "jquery_inputmask",
   "repository": "robinherbots/jquery.inputmask",
   "description": "jquery.inputmask is a jquery plugin which create an input mask.",
-  "version": "3.2.8-36",
+  "version": "3.2.8-37",
   "keywords": ["jquery", "plugins", "input", "form", "inputmask", "mask"],
   "main": "./dist/jquery.inputmask.bundle.js",
   "scripts": [

+ 1 - 1
composer.json

@@ -1,7 +1,7 @@
 {
   "name": "robinherbots/jquery.inputmask",
   "description": "jquery.inputmask is a jquery plugin which create an input mask.",
-  "version": "3.2.8-36",
+  "version": "3.2.8-37",
   "type": "library",
   "keywords": ["jquery", "plugins", "input", "form", "inputmask", "mask"],
   "homepage": "http://robinherbots.github.io/jquery.inputmask",

+ 1 - 1
dist/inputmask/inputmask.date.extensions.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2016 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.2.8-36
+* Version: 3.2.8-37
 */
 !function(factory) {
     "function" == typeof define && define.amd ? define([ "inputmask.dependencyLib", "inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("./inputmask.dependencyLib.jquery"), require("./inputmask")) : factory(window.dependencyLib || jQuery, window.Inputmask);

+ 1 - 1
dist/inputmask/inputmask.dependencyLib.jquery.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2016 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.2.8-36
+* Version: 3.2.8-37
 */
 !function(factory) {
     "function" == typeof define && define.amd ? define([ "jquery" ], factory) : "object" == typeof exports ? module.exports = factory(require("jquery")) : factory(jQuery);

+ 1 - 1
dist/inputmask/inputmask.extensions.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2016 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.2.8-36
+* Version: 3.2.8-37
 */
 !function(factory) {
     "function" == typeof define && define.amd ? define([ "inputmask.dependencyLib", "inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("./inputmask.dependencyLib.jquery"), require("./inputmask")) : factory(window.dependencyLib || jQuery, window.Inputmask);

+ 1 - 1
dist/inputmask/inputmask.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2016 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.2.8-36
+* Version: 3.2.8-37
 */
 !function(factory) {
     "function" == typeof define && define.amd ? define([ "inputmask.dependencyLib" ], factory) : "object" == typeof exports ? module.exports = factory(require("./inputmask.dependencyLib.jquery")) : factory(window.dependencyLib || jQuery);

+ 4 - 4
dist/inputmask/inputmask.numeric.extensions.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2016 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.2.8-36
+* Version: 3.2.8-37
 */
 !function(factory) {
     "function" == typeof define && define.amd ? define([ "inputmask.dependencyLib", "inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("./inputmask.dependencyLib.jquery"), require("./inputmask")) : factory(window.dependencyLib || jQuery, window.Inputmask);
@@ -205,7 +205,7 @@
             leadingZeroHandler: function(chrs, maskset, pos, strict, opts, isSelection) {
                 if (!strict) if (opts.numericInput === !0) {
                     var buffer = maskset.buffer.slice("").reverse(), char = buffer[opts.prefix.length];
-                    if ("0" === char) return {
+                    if ("0" === char && void 0 === maskset.validPositions[pos - 1]) return {
                         pos: pos,
                         remove: buffer.length - opts.prefix.length - 1
                     };
@@ -214,8 +214,8 @@
                     if (matchRslt && (-1 === radixPosition || radixPosition >= pos)) {
                         var decimalPart = -1 === radixPosition ? 0 : parseInt(maskset.buffer.slice(radixPosition + 1).join(""));
                         if (0 === matchRslt[0].indexOf("" !== opts.placeholder ? opts.placeholder.charAt(0) : "0") && (matchRslt.index + 1 === pos || isSelection !== !0 && 0 === decimalPart)) return maskset.buffer.splice(matchRslt.index, 1), 
-                        pos = matchRslt.index, {
-                            pos: pos,
+                        {
+                            pos: matchRslt.index,
                             remove: matchRslt.index
                         };
                         if ("0" === chrs && pos <= matchRslt.index && matchRslt[0] !== opts.groupSeparator) return !1;

+ 1 - 1
dist/inputmask/inputmask.phone.extensions.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2016 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.2.8-36
+* Version: 3.2.8-37
 */
 !function(factory) {
     "function" == typeof define && define.amd ? define([ "jquery", "inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("jquery"), require("./inputmask")) : factory(window.dependencyLib || jQuery, window.Inputmask);

+ 1 - 1
dist/inputmask/inputmask.regex.extensions.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2016 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.2.8-36
+* Version: 3.2.8-37
 */
 !function(factory) {
     "function" == typeof define && define.amd ? define([ "inputmask.dependencyLib", "inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("./inputmask.dependencyLib.jquery"), require("./inputmask")) : factory(window.dependencyLib || jQuery, window.Inputmask);

+ 1 - 1
dist/inputmask/jquery.inputmask.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2016 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.2.8-36
+* Version: 3.2.8-37
 */
 !function(factory) {
     "function" == typeof define && define.amd ? define([ "jquery", "inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("jquery"), require("./inputmask")) : factory(jQuery, window.Inputmask);

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

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2016 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.2.8-36
+* Version: 3.2.8-37
 */
 !function($) {
     function Inputmask(alias, options) {
@@ -2285,7 +2285,7 @@
             leadingZeroHandler: function(chrs, maskset, pos, strict, opts, isSelection) {
                 if (!strict) if (opts.numericInput === !0) {
                     var buffer = maskset.buffer.slice("").reverse(), char = buffer[opts.prefix.length];
-                    if ("0" === char) return {
+                    if ("0" === char && void 0 === maskset.validPositions[pos - 1]) return {
                         pos: pos,
                         remove: buffer.length - opts.prefix.length - 1
                     };
@@ -2294,8 +2294,8 @@
                     if (matchRslt && (-1 === radixPosition || radixPosition >= pos)) {
                         var decimalPart = -1 === radixPosition ? 0 : parseInt(maskset.buffer.slice(radixPosition + 1).join(""));
                         if (0 === matchRslt[0].indexOf("" !== opts.placeholder ? opts.placeholder.charAt(0) : "0") && (matchRslt.index + 1 === pos || isSelection !== !0 && 0 === decimalPart)) return maskset.buffer.splice(matchRslt.index, 1), 
-                        pos = matchRslt.index, {
-                            pos: pos,
+                        {
+                            pos: matchRslt.index,
                             remove: matchRslt.index
                         };
                         if ("0" === chrs && pos <= matchRslt.index && matchRslt[0] !== opts.groupSeparator) return !1;

文件差异内容过多而无法显示
+ 1 - 1
dist/min/inputmask/inputmask.date.extensions.min.js


+ 1 - 1
dist/min/inputmask/inputmask.dependencyLib.jquery.min.js

@@ -3,6 +3,6 @@
 * https://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2016 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.2.8-36
+* Version: 3.2.8-37
 */
 !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){return window.dependencyLib=a,a});

文件差异内容过多而无法显示
+ 1 - 1
dist/min/inputmask/inputmask.extensions.min.js


文件差异内容过多而无法显示
+ 1 - 1
dist/min/inputmask/inputmask.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/min/inputmask/inputmask.numeric.extensions.min.js


文件差异内容过多而无法显示
+ 1 - 1
dist/min/inputmask/inputmask.phone.extensions.min.js


文件差异内容过多而无法显示
+ 1 - 1
dist/min/inputmask/inputmask.regex.extensions.min.js


文件差异内容过多而无法显示
+ 1 - 1
dist/min/inputmask/jquery.inputmask.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/min/jquery.inputmask.bundle.min.js


+ 2 - 3
js/inputmask.numeric.extensions.js

@@ -397,7 +397,7 @@
 					if (opts.numericInput === true) {
 						var buffer = maskset.buffer.slice("").reverse();
 						var char = buffer[opts.prefix.length];
-						if (char === "0") {
+						if (char === "0" && maskset.validPositions[pos - 1] === undefined) {
 							return {
 								"pos": pos,
 								"remove": buffer.length - opts.prefix.length - 1
@@ -411,9 +411,8 @@
 							if (matchRslt["0"].indexOf(opts.placeholder !== "" ? opts.placeholder.charAt(0) : "0") === 0 &&
 								(matchRslt.index + 1 === pos || (isSelection !== true && decimalPart === 0))) {
 								maskset.buffer.splice(matchRslt.index, 1);
-								pos = matchRslt.index;
 								return {
-									"pos": pos,
+									"pos": matchRslt.index,
 									"remove": matchRslt.index
 								};
 							} else if (chrs === "0" && pos <= matchRslt.index && matchRslt["0"] !== opts.groupSeparator) {

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "jquery.inputmask",
-  "version": "3.2.8-36",
+  "version": "3.2.8-37",
   "description": "jquery.inputmask is a jquery plugin which create an input mask.",
   "main": "./dist/inputmask/jquery.inputmask.js",
   "files": [

+ 3 - 3
qunit/config.js

@@ -4,10 +4,10 @@ require.config({
 		"jquery": "../node_modules/jquery/dist/jquery",
 		"jqlite": "../node_modules/jqlite/jqlite",
 		"qunit": "../node_modules/qunitjs/qunit/qunit",
-		 "inputmask.dependencyLib": "../dist/inputmask/inputmask.dependencyLib.jquery",
+		"inputmask.dependencyLib": "../dist/inputmask/inputmask.dependencyLib.jquery",
 		//"inputmask.dependencyLib": "../extra/dependencyLibs/inputmask.dependencyLib",
 		// "inputmask.dependencyLib": "../extra/dependencyLibs/inputmask.dependencyLib.jqlite",
-		//"inputmask": "../dist/inputmask/inputmask"
-		"inputmask": "../js/inputmask"
+		"inputmask": "../dist/inputmask/inputmask"
+		//"inputmask": "../js/inputmask"
 	}
 });

+ 60 - 39
qunit/tests_numericinput.js

@@ -9,10 +9,10 @@ define([
 	"../dist/inputmask/inputmask.regex.extensions",
 	"prototypeExtensions",
 	"simulator"
-], function(qunit, $, Inputmask) {
+], function (qunit, $, Inputmask) {
 
 	qunit.module("Direction RTL");
-	qunit.test("inputmask(\"999.999.999\") - delete 2nd with backspace, continue the mask", function(assert) {
+	qunit.test("inputmask(\"999.999.999\") - delete 2nd with backspace, continue the mask", function (assert) {
 		var done = assert.async(),
 			$fixture = $("#qunit-fixture");
 		$fixture.append('<input type="text" id="testmask" dir="rtl" />');
@@ -20,7 +20,7 @@ define([
 		Inputmask("999.999.999").mask(testmask);
 
 		testmask.focus();
-		setTimeout(function() {
+		setTimeout(function () {
 			$("#testmask").SendKey("1");
 			$("#testmask").SendKey("2");
 			$("#testmask").SendKey("3");
@@ -38,7 +38,7 @@ define([
 		}, 0);
 	});
 
-	qunit.test("inputmask(\"999.999.999\") - delete 2nd with delete, continue the mask", function(assert) {
+	qunit.test("inputmask(\"999.999.999\") - delete 2nd with delete, continue the mask", function (assert) {
 		var done = assert.async(),
 			$fixture = $("#qunit-fixture");
 		$fixture.append('<input type="text" id="testmask" dir="rtl" />');
@@ -46,7 +46,7 @@ define([
 		Inputmask("999.999.999").mask(testmask);
 
 		testmask.focus();
-		setTimeout(function() {
+		setTimeout(function () {
 			$("#testmask").SendKey("1");
 			$("#testmask").SendKey("2");
 			$("#testmask").SendKey("3");
@@ -63,7 +63,7 @@ define([
 		}, 0);
 	});
 
-	qunit.test("inputmask(\"999-aaa-999\")", function(assert) {
+	qunit.test("inputmask(\"999-aaa-999\")", function (assert) {
 		var done = assert.async(),
 			$fixture = $("#qunit-fixture");
 		$fixture.append('<input type="text" id="testmask" dir="rtl" />');
@@ -71,7 +71,7 @@ define([
 		Inputmask("999-aaa-999").mask(testmask);
 
 		testmask.focus();
-		setTimeout(function() {
+		setTimeout(function () {
 			$("#testmask").Type("123abc12");
 			assert.equal(testmask.value, "_21-cba-321", "Result " + testmask.value);
 			done();
@@ -79,7 +79,7 @@ define([
 		}, 0);
 	});
 
-	qunit.test("inputmask(\"999-999-999\") - replace selection", function(assert) {
+	qunit.test("inputmask(\"999-999-999\") - replace selection", function (assert) {
 		var done = assert.async(),
 			$fixture = $("#qunit-fixture");
 		$fixture.append('<input type="text" id="testmask" dir="rtl" />');
@@ -87,7 +87,7 @@ define([
 		Inputmask("999-999-999").mask(testmask);
 
 		testmask.focus();
-		setTimeout(function() {
+		setTimeout(function () {
 			$("#testmask").Type("123456789");
 			$.caret(testmask, 4, 7);
 			$("#testmask").Type("5");
@@ -97,7 +97,7 @@ define([
 		}, 0);
 	});
 
-	qunit.test("inputmask(\"999-999-999\") - replace selection with backspace", function(assert) {
+	qunit.test("inputmask(\"999-999-999\") - replace selection with backspace", function (assert) {
 		var done = assert.async(),
 			$fixture = $("#qunit-fixture");
 		$fixture.append('<input type="text" id="testmask" dir="rtl" />');
@@ -105,7 +105,7 @@ define([
 		Inputmask("999-999-999").mask(testmask);
 
 		testmask.focus();
-		setTimeout(function() {
+		setTimeout(function () {
 			$("#testmask").Type("123456789");
 			$.caret(testmask, 4, 7);
 			$("#testmask").SendKey(Inputmask.keyCode.BACKSPACE);
@@ -116,7 +116,7 @@ define([
 		}, 0);
 	});
 
-	qunit.test("inputmask(\"999-999-999\") - replace selection - with delete", function(assert) {
+	qunit.test("inputmask(\"999-999-999\") - replace selection - with delete", function (assert) {
 		var done = assert.async(),
 			$fixture = $("#qunit-fixture");
 		$fixture.append('<input type="text" id="testmask" dir="rtl" />');
@@ -124,7 +124,7 @@ define([
 		Inputmask("999-999-999").mask(testmask);
 
 		testmask.focus();
-		setTimeout(function() {
+		setTimeout(function () {
 			$("#testmask").Type("123456789");
 			$.caret(testmask, 4, 7);
 			$("#testmask").SendKey(Inputmask.keyCode.DELETE);
@@ -136,7 +136,7 @@ define([
 	});
 
 	qunit.module("Numeric Input");
-	qunit.test("inputmask({ mask: \"9\", numericInput: true, repeat: 10, greedy: true }); - 1234567890", function(assert) {
+	qunit.test("inputmask({ mask: \"9\", numericInput: true, repeat: 10, greedy: true }); - 1234567890", function (assert) {
 		var done = assert.async(),
 			$fixture = $("#qunit-fixture");
 		$fixture.append('<input type="text" id="testmask" />');
@@ -149,14 +149,14 @@ define([
 		}).mask(testmask);
 
 		testmask.focus();
-		setTimeout(function() {
+		setTimeout(function () {
 			$("#testmask").Type("1234567890");
 			assert.equal(testmask.value, "1234567890", "Result " + testmask.value);
 			done();
 
 		}, 0);
 	});
-	qunit.test("inputmask({ mask: \"9\", numericInput: true, repeat: 10, greedy: true }); - replace selection", function(assert) {
+	qunit.test("inputmask({ mask: \"9\", numericInput: true, repeat: 10, greedy: true }); - replace selection", function (assert) {
 		var done = assert.async(),
 			$fixture = $("#qunit-fixture");
 		$fixture.append('<input type="text" id="testmask" />');
@@ -169,7 +169,7 @@ define([
 		}).mask(testmask);
 
 		testmask.focus();
-		setTimeout(function() {
+		setTimeout(function () {
 			$("#testmask").Type("1234567890");
 			$.caret(testmask, 3, 6);
 			$("#testmask").Type("5");
@@ -179,7 +179,7 @@ define([
 		}, 0);
 	});
 
-	qunit.test("inputmask({ mask: \"99-99-99\", numericInput: true }); - 1234567890", function(assert) {
+	qunit.test("inputmask({ mask: \"99-99-99\", numericInput: true }); - 1234567890", function (assert) {
 		var done = assert.async(),
 			$fixture = $("#qunit-fixture");
 		$fixture.append('<input type="text" id="testmask" />');
@@ -190,7 +190,7 @@ define([
 		}).mask(testmask);
 
 		testmask.focus();
-		setTimeout(function() {
+		setTimeout(function () {
 			$("#testmask").Type("1234567890");
 			assert.equal(testmask.value, "12-34-56", "Result " + testmask.value);
 			done();
@@ -198,7 +198,7 @@ define([
 		}, 0);
 	});
 
-	qunit.test("inputmask({ mask: \"€ 999.999.999,99\", numericInput: true }); - 123", function(assert) {
+	qunit.test("inputmask({ mask: \"€ 999.999.999,99\", numericInput: true }); - 123", function (assert) {
 		var done = assert.async(),
 			$fixture = $("#qunit-fixture");
 		$fixture.append('<input type="text" id="testmask" />');
@@ -208,7 +208,7 @@ define([
 		}).mask(testmask);
 
 		testmask.focus();
-		setTimeout(function() {
+		setTimeout(function () {
 			$("#testmask").Type("123");
 			assert.equal(testmask.value, "€ ___.___.__1,23", "Result " + testmask.value);
 			done();
@@ -216,7 +216,7 @@ define([
 		}, 0);
 	});
 
-	qunit.test("inputmask({ mask: \"€ 999.999.999,99\", numericInput: true }); - 123 position before 456", function(assert) {
+	qunit.test("inputmask({ mask: \"€ 999.999.999,99\", numericInput: true }); - 123 position before 456", function (assert) {
 		var done = assert.async(),
 			$fixture = $("#qunit-fixture");
 		$fixture.append('<input type="text" id="testmask" />');
@@ -226,7 +226,7 @@ define([
 		}).mask(testmask);
 
 		testmask.focus();
-		setTimeout(function() {
+		setTimeout(function () {
 			$("#testmask").Type("123");
 			$.caret(testmask, 12);
 			$("#testmask").Type("456");
@@ -236,7 +236,7 @@ define([
 		}, 0);
 	});
 
-	qunit.test("inputmask({ mask: \"€ 999.999.999,99\", { numericInput: true, radixPoint: \",\" }); - 123", function(assert) {
+	qunit.test("inputmask({ mask: \"€ 999.999.999,99\", { numericInput: true, radixPoint: \",\" }); - 123", function (assert) {
 		var done = assert.async(),
 			$fixture = $("#qunit-fixture");
 		$fixture.append('<input type="text" id="testmask" />');
@@ -247,8 +247,9 @@ define([
 		}).mask(testmask);
 
 		testmask.focus();
-		$("#testmask").trigger("click");;
-		setTimeout(function() {
+		$("#testmask").trigger("click");
+		;
+		setTimeout(function () {
 			$("#testmask").Type("123");
 
 			assert.equal(testmask.value, "€ ___.___.__1,23", "Result " + testmask.value);
@@ -257,7 +258,7 @@ define([
 		}, 0);
 	});
 
-	qunit.test("inputmask({ mask: \"€ 999.999.999,99\", { numericInput: true, radixPoint: \",\" }); - 123,45", function(assert) {
+	qunit.test("inputmask({ mask: \"€ 999.999.999,99\", { numericInput: true, radixPoint: \",\" }); - 123,45", function (assert) {
 		var done = assert.async(),
 			$fixture = $("#qunit-fixture");
 		$fixture.append('<input type="text" id="testmask" />');
@@ -268,8 +269,9 @@ define([
 		}).mask(testmask);
 
 		testmask.focus();
-		$("#testmask").trigger("click");;
-		setTimeout(function() {
+		$("#testmask").trigger("click");
+		;
+		setTimeout(function () {
 			$("#testmask").Type("123,45");
 
 			assert.equal(testmask.value, "€ ___.___.123,45", "Result " + testmask.value);
@@ -278,7 +280,7 @@ define([
 		}, 0);
 	});
 
-	qunit.test("inputmask({ mask: \"9999 t\", { numericInput: true }); - 123 - Joe Rosa", function(assert) {
+	qunit.test("inputmask({ mask: \"9999 t\", { numericInput: true }); - 123 - Joe Rosa", function (assert) {
 		var done = assert.async(),
 			$fixture = $("#qunit-fixture");
 		$fixture.append('<input type="text" id="testmask" />');
@@ -288,8 +290,9 @@ define([
 		}).mask(testmask);
 
 		testmask.focus();
-		$("#testmask").trigger("click");;
-		setTimeout(function() {
+		$("#testmask").trigger("click");
+		;
+		setTimeout(function () {
 			$("#testmask").Type("123");
 			assert.equal(testmask.value, "_123 t", "Result " + testmask.value);
 			done();
@@ -297,7 +300,7 @@ define([
 		}, 0);
 	});
 
-	qunit.test("inputmask({ mask: \"9999 t\", { numericInput: true, autoUnmask: true }); - 70  - Joe Rosa", function(assert) {
+	qunit.test("inputmask({ mask: \"9999 t\", { numericInput: true, autoUnmask: true }); - 70  - Joe Rosa", function (assert) {
 		var done = assert.async(),
 			$fixture = $("#qunit-fixture");
 		$fixture.append('<input type="text" id="testmask" />');
@@ -308,8 +311,9 @@ define([
 		}).mask(testmask);
 
 		testmask.focus();
-		$("#testmask").trigger("click");;
-		setTimeout(function() {
+		$("#testmask").trigger("click");
+		;
+		setTimeout(function () {
 			$("#testmask").Type("70");
 			assert.equal(testmask.value, "70", "Result " + testmask.value);
 			done();
@@ -317,20 +321,20 @@ define([
 		}, 0);
 	});
 
-	qunit.test("inputmask({ mask: \"['$9.99', '$99.99', '$999.99', '$9,999.99', '$99,999.99', '$999,999.99', '$9,999,999.99', '$99,999,999.99', '$999,999,999.99'], 'placeholder': ' ', 'numericInput': true, 'rightAlignNumerics': false\" value=\"$100000.00\"", function(assert) {
+	qunit.test("inputmask({ mask: \"['$9.99', '$99.99', '$999.99', '$9,999.99', '$99,999.99', '$999,999.99', '$9,999,999.99', '$99,999,999.99', '$999,999,999.99'], 'placeholder': ' ', 'numericInput': true, 'rightAlignNumerics': false\" value=\"$100000.00\"", function (assert) {
 		var done = assert.async(),
 			$fixture = $("#qunit-fixture");
 		$fixture.append("<input type=\"text\" id=\"testmask\" data-inputmask=\"'mask': ['$9.99', '$99.99', '$999.99', '$9,999.99', '$99,999.99', '$999,999.99', '$9,999,999.99', '$99,999,999.99', '$999,999,999.99'], 'placeholder': ' ', 'numericInput': true, 'rightAlignNumerics': false\" value=\"$100000.00\"/>");
 		var testmask = document.getElementById("testmask");
 		Inputmask().mask(testmask);
-		setTimeout(function() {
+		setTimeout(function () {
 			assert.equal(testmask.value, "$100,000.00", "Result " + testmask.value);
 			done();
 
 		}, 0);
 	});
 
-	qunit.test("cuurency - numericInput: true - 123456 backspace x4", function(assert) {
+	qunit.test("cuurency - numericInput: true - 123456 backspace x4", function (assert) {
 		var done = assert.async(),
 			$fixture = $("#qunit-fixture");
 		$fixture.append('<input type="text" id="testmask" />');
@@ -340,7 +344,7 @@ define([
 		}).mask(testmask);
 
 		testmask.focus();
-		setTimeout(function() {
+		setTimeout(function () {
 			$("#testmask").Type("123456");
 			$("#testmask").SendKey(Inputmask.keyCode.BACKSPACE);
 			$("#testmask").SendKey(Inputmask.keyCode.BACKSPACE);
@@ -353,4 +357,21 @@ define([
 		}, 0);
 	});
 
+	qunit.test("decimal - numericInput: true - initial value 20,00 - Inkeliz", function (assert) {
+		var $fixture = $("#qunit-fixture");
+		$fixture.append('<input type="text" id="testmask" value="20,00" />');
+		var testmask = document.getElementById("testmask");
+		Inputmask('decimal', {
+			radixPoint: ',',
+			rightAlign: false,
+			showMaskOnHover: false,
+			numericInput: true,
+			allowPlus: false,
+			rightAlignNumerics: false,
+			greedy: false
+		}).mask(testmask);
+
+		assert.equal(testmask.value, "20,00", "Result " + testmask.value);
+
+	});
 });