ソースを参照

mobile chrome

Robin Herbots 12 年 前
コミット
8f453ebbc6

+ 1 - 1
build.properties

@@ -7,7 +7,7 @@ distdir = dist
 
 build.major = 2
 build.minor = 4
-build.revision = 4
+build.revision = 5
 
 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.4.4",
+    "version": "2.4.5",
     "main": "./dist/jquery.inputmask.bundle.js",
     "dependencies": {
         "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
 * Copyright (c) 2010 - 2013 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 2.4.4
+* Version: 2.4.5
 */
 
 (function ($) {
@@ -510,7 +510,7 @@
             function maskScope(masksets, activeMasksetIndex) {
                 var isRTL = false,
                     valueOnFocus = getActiveBuffer().join(''),
-                    $el;
+                    $el, chromeValueOnInput;
 
                 //maskset helperfunctions
                 function getActiveMaskSet() {
@@ -1139,12 +1139,12 @@
                         $el.bind("input.inputmask", function (e) {
                             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 {
                         $el.bind("keydown.inputmask", keydownEvent
@@ -1632,7 +1632,8 @@
                         var $input = $(this), input = this, k = e.keyCode, buffer = getActiveBuffer();
 
                         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
@@ -1660,7 +1661,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.4.4
+Version: 2.4.5
 
 Optional extensions on the jquery.inputmask base
 */
@@ -1782,7 +1783,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.4.4
+Version: 2.4.5
 
 Optional extensions on the jquery.inputmask base
 */
@@ -2266,7 +2267,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.4.4
+Version: 2.4.5
 
 Optional extensions on the jquery.inputmask base
 */
@@ -2443,7 +2444,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.4.4
+Version: 2.4.5
 
 Regex extensions on the jquery.inputmask base
 Allows for using regular expressions as a mask
@@ -2613,7 +2614,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.4.4
+Version: 2.4.5
 
 Phone extension.
 When using this extension make sure you specify the correct url to get the masks

ファイルの差分が大きいため隠しています
+ 20 - 20
dist/jquery.inputmask.bundle.min.js


ファイルの差分が大きいため隠しています
+ 46 - 46
dist/min/jquery.inputmask.js


+ 1 - 1
jquery.inputmask.jquery.json

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

+ 8 - 10
js/jquery.inputmask.js

@@ -1139,14 +1139,12 @@
                         $el.bind("input.inputmask", function (e) {
                             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 {
                         $el.bind("keydown.inputmask", keydownEvent
@@ -1634,8 +1632,8 @@
                         var $input = $(this), input = this, k = e.keyCode, buffer = getActiveBuffer();
 
                         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