Browse Source

mobile chrome

Robin Herbots 12 years ago
parent
commit
8f453ebbc6

+ 1 - 1
build.properties

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

+ 1 - 1
component.json

@@ -1,6 +1,6 @@
 {
 {
     "name": "jquery.inputmask",
     "name": "jquery.inputmask",
-    "version": "2.4.4",
+    "version": "2.4.5",
     "main": "./dist/jquery.inputmask.bundle.js",
     "main": "./dist/jquery.inputmask.bundle.js",
     "dependencies": {
     "dependencies": {
         "jquery": ">=1.7"
         "jquery": ">=1.7"

BIN
dist/jQuery.InputMask.2.4.4.nupkg


BIN
dist/jQuery.InputMask.2.4.5.nupkg


+ 15 - 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 - 2013 Robin Herbots
 * Copyright (c) 2010 - 2013 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: 2.4.4
+* Version: 2.4.5
 */
 */
 
 
 (function ($) {
 (function ($) {
@@ -510,7 +510,7 @@
             function maskScope(masksets, activeMasksetIndex) {
             function maskScope(masksets, activeMasksetIndex) {
                 var isRTL = false,
                 var isRTL = false,
                     valueOnFocus = getActiveBuffer().join(''),
                     valueOnFocus = getActiveBuffer().join(''),
-                    $el;
+                    $el, chromeValueOnInput;
 
 
                 //maskset helperfunctions
                 //maskset helperfunctions
                 function getActiveMaskSet() {
                 function getActiveMaskSet() {
@@ -1139,12 +1139,12 @@
                         $el.bind("input.inputmask", function (e) {
                         $el.bind("input.inputmask", function (e) {
                             var input = this, $input = $(input);
                             var input = this, $input = $(input);
 
 
-                            setTimeout(function () {
-                                checkVal(input, true, false);
-                                if (isComplete(getActiveBuffer()) === true)
-                                    $input.trigger("complete");
-                                $input.click();
-                            }, 0);
+                            chromeValueOnInput = getActiveBuffer().join('');
+                            checkVal(input, false, false);
+                            writeBuffer(input, getActiveBuffer());
+                            if (isComplete(getActiveBuffer()) === true)
+                                $input.trigger("complete");
+                            $input.click();
                         });
                         });
                     } else {
                     } else {
                         $el.bind("keydown.inputmask", keydownEvent
                         $el.bind("keydown.inputmask", keydownEvent
@@ -1632,7 +1632,8 @@
                         var $input = $(this), input = this, k = e.keyCode, buffer = getActiveBuffer();
                         var $input = $(this), input = this, k = e.keyCode, buffer = getActiveBuffer();
 
 
                         if (androidchrome && k == opts.keyCode.BACKSPACE) {
                         if (androidchrome && k == opts.keyCode.BACKSPACE) {
-                            keydownEvent.call(this, e);
+                            if (chromeValueOnInput == input._valueGet())
+                                keydownEvent.call(this, e);
                         }
                         }
 
 
                         opts.onKeyUp.call(this, e, buffer, opts); //extra stuff to execute on keyup
                         opts.onKeyUp.call(this, e, buffer, opts); //extra stuff to execute on keyup
@@ -1660,7 +1661,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2013 Robin Herbots
 Copyright (c) 2010 - 2013 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: 2.4.4
+Version: 2.4.5
 
 
 Optional extensions on the jquery.inputmask base
 Optional extensions on the jquery.inputmask base
 */
 */
@@ -1782,7 +1783,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2012 Robin Herbots
 Copyright (c) 2010 - 2012 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: 2.4.4
+Version: 2.4.5
 
 
 Optional extensions on the jquery.inputmask base
 Optional extensions on the jquery.inputmask base
 */
 */
@@ -2266,7 +2267,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2013 Robin Herbots
 Copyright (c) 2010 - 2013 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: 2.4.4
+Version: 2.4.5
 
 
 Optional extensions on the jquery.inputmask base
 Optional extensions on the jquery.inputmask base
 */
 */
@@ -2443,7 +2444,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2013 Robin Herbots
 Copyright (c) 2010 - 2013 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: 2.4.4
+Version: 2.4.5
 
 
 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
@@ -2613,7 +2614,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2013 Robin Herbots
 Copyright (c) 2010 - 2013 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: 2.4.4
+Version: 2.4.5
 
 
 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
+ 20 - 20
dist/jquery.inputmask.bundle.min.js


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


+ 1 - 1
jquery.inputmask.jquery.json

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

+ 8 - 10
js/jquery.inputmask.js

@@ -1139,14 +1139,12 @@
                         $el.bind("input.inputmask", function (e) {
                         $el.bind("input.inputmask", function (e) {
                             var input = this, $input = $(input);
                             var input = this, $input = $(input);
 
 
-							chromeValueOnInput = getActiveBuffer().join('');
-                            setTimeout(function () {
-                                checkVal(input, false, false);
-                                writeBuffer(input, getActiveBuffer());
-                                if (isComplete(getActiveBuffer()) === true)
-                                    $input.trigger("complete");
-                                $input.click();
-                            }, 0);
+                            chromeValueOnInput = getActiveBuffer().join('');
+                            checkVal(input, false, false);
+                            writeBuffer(input, getActiveBuffer());
+                            if (isComplete(getActiveBuffer()) === true)
+                                $input.trigger("complete");
+                            $input.click();
                         });
                         });
                     } else {
                     } else {
                         $el.bind("keydown.inputmask", keydownEvent
                         $el.bind("keydown.inputmask", keydownEvent
@@ -1634,8 +1632,8 @@
                         var $input = $(this), input = this, k = e.keyCode, buffer = getActiveBuffer();
                         var $input = $(this), input = this, k = e.keyCode, buffer = getActiveBuffer();
 
 
                         if (androidchrome && k == opts.keyCode.BACKSPACE) {
                         if (androidchrome && k == opts.keyCode.BACKSPACE) {
-                        	if(chromeValueOnInput == input._valueGet())
-                           		keydownEvent.call(this, e);
+                            if (chromeValueOnInput == input._valueGet())
+                                keydownEvent.call(this, e);
                         }
                         }
 
 
                         opts.onKeyUp.call(this, e, buffer, opts); //extra stuff to execute on keyup
                         opts.onKeyUp.call(this, e, buffer, opts); //extra stuff to execute on keyup