Browse Source

renable android chrome patch

Robin Herbots 11 years ago
parent
commit
bdb777afe7

+ 1 - 1
bower.json

@@ -1,6 +1,6 @@
 {
 {
     "name": "jquery.inputmask",
     "name": "jquery.inputmask",
-    "version": "3.0.22",
+    "version": "3.0.23",
     "main": "./dist/jquery.inputmask.bundle.js",
     "main": "./dist/jquery.inputmask.bundle.js",
 	"keywords" : ["jQuery", "plugins", "input", "form", "inputmask", "mask"],
 	"keywords" : ["jQuery", "plugins", "input", "form", "inputmask", "mask"],
 	"description": "jquery.inputmask is a jquery plugin which create an input 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.major = 3
 build.minor = 0
 build.minor = 0
-build.revision = 22
+build.revision = 23
 
 
 target = jquery.inputmask.bundle.js
 target = jquery.inputmask.bundle.js
 target.min = jquery.inputmask.bundle.min.js
 target.min = jquery.inputmask.bundle.min.js

BIN
dist/jQuery.InputMask.3.0.22.nupkg


BIN
dist/jQuery.InputMask.3.0.23.nupkg


+ 12 - 14
dist/jquery.inputmask.bundle.js

@@ -3,7 +3,7 @@
 * http://github.com/RobinHerbots/jquery.inputmask
 * http://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2014 Robin Herbots
 * Copyright (c) 2010 - 2014 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.0.22
+* Version: 3.0.23
 */
 */
 
 
 (function ($) {
 (function ($) {
@@ -1317,15 +1317,13 @@
                             .attr("autocapitalize", "off")
                             .attr("autocapitalize", "off")
                             .attr("spellcheck", false);
                             .attr("spellcheck", false);
 
 
-                        if (androidfirefox || kindle) {
-                            $el.unbind("keydown.inputmask", keydownEvent
-                            ).unbind("keypress.inputmask", keypressEvent
-                            ).unbind("keyup.inputmask", keyupEvent);
-                            if (PasteEventType == "input") {
-                                $el.unbind(PasteEventType + ".inputmask");
-                            }
-                            $el.bind("input.inputmask", mobileInputEvent);
+                        $el.unbind("keydown.inputmask", keydownEvent
+                        ).unbind("keypress.inputmask", keypressEvent
+                        ).unbind("keyup.inputmask", keyupEvent);
+                        if (PasteEventType == "input") {
+                            $el.unbind(PasteEventType + ".inputmask");
                         }
                         }
+                        $el.bind("input.inputmask", mobileInputEvent);
                     }
                     }
 
 
                     if (msie1x)
                     if (msie1x)
@@ -1852,7 +1850,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2014 Robin Herbots
 Copyright (c) 2010 - 2014 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 3.0.22
+Version: 3.0.23
 
 
 Optional extensions on the jquery.inputmask base
 Optional extensions on the jquery.inputmask base
 */
 */
@@ -1962,7 +1960,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2014 Robin Herbots
 Copyright (c) 2010 - 2014 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 3.0.22
+Version: 3.0.23
 
 
 Optional extensions on the jquery.inputmask base
 Optional extensions on the jquery.inputmask base
 */
 */
@@ -2425,7 +2423,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2014 Robin Herbots
 Copyright (c) 2010 - 2014 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 3.0.22
+Version: 3.0.23
 
 
 Optional extensions on the jquery.inputmask base
 Optional extensions on the jquery.inputmask base
 */
 */
@@ -2579,7 +2577,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2014 Robin Herbots
 Copyright (c) 2010 - 2014 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 3.0.22
+Version: 3.0.23
 
 
 Regex extensions on the jquery.inputmask base
 Regex extensions on the jquery.inputmask base
 Allows for using regular expressions as a mask
 Allows for using regular expressions as a mask
@@ -2766,7 +2764,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2014 Robin Herbots
 Copyright (c) 2010 - 2014 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 3.0.22
+Version: 3.0.23
 
 
 Phone extension.
 Phone extension.
 When using this extension make sure you specify the correct url to get the masks
 When using this extension make sure you specify the correct url to get the masks

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


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


+ 1 - 1
jquery.inputmask.jquery.json

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

+ 6 - 8
js/jquery.inputmask.js

@@ -1317,15 +1317,13 @@
                             .attr("autocapitalize", "off")
                             .attr("autocapitalize", "off")
                             .attr("spellcheck", false);
                             .attr("spellcheck", false);
 
 
-                        if (androidfirefox || kindle) {
-                            $el.unbind("keydown.inputmask", keydownEvent
-                            ).unbind("keypress.inputmask", keypressEvent
-                            ).unbind("keyup.inputmask", keyupEvent);
-                            if (PasteEventType == "input") {
-                                $el.unbind(PasteEventType + ".inputmask");
-                            }
-                            $el.bind("input.inputmask", mobileInputEvent);
+                        $el.unbind("keydown.inputmask", keydownEvent
+                        ).unbind("keypress.inputmask", keypressEvent
+                        ).unbind("keyup.inputmask", keyupEvent);
+                        if (PasteEventType == "input") {
+                            $el.unbind(PasteEventType + ".inputmask");
                         }
                         }
+                        $el.bind("input.inputmask", mobileInputEvent);
                     }
                     }
 
 
                     if (msie1x)
                     if (msie1x)

+ 15 - 0
qunit/tests.js

@@ -274,6 +274,21 @@ test("Intergroup selection - dhilt", function () {
     $("#testmask").remove();
     $("#testmask").remove();
 });
 });
 
 
+test("Delete selection with non-masks", function () {
+    var $fixture = $("#qunit-fixture");
+    $fixture.append('<input type="text" id="testmask" />');
+    $("#testmask").inputmask("(999)999-9999");
+
+    $("#testmask")[0].focus();
+    $("#testmask").Type("9999999999");
+
+    caret($("#testmask"), 8, 11);
+    $("#testmask").SendKey(keyCodes.DELETE);
+    equal($("#testmask").val(), "(999)999-99__", "Result " + $("#testmask").val());
+
+    $("#testmask").remove();
+});
+
 module("Non-greedy masks");
 module("Non-greedy masks");
 test("inputmask(\"*\", { greedy: false, repeat: \"*\" }) - replace cd with 1", function () {
 test("inputmask(\"*\", { greedy: false, repeat: \"*\" }) - replace cd with 1", function () {
     var $fixture = $("#qunit-fixture");
     var $fixture = $("#qunit-fixture");