浏览代码

fix initial caret positioning

Robin Herbots 12 年之前
父节点
当前提交
0c043f4850

+ 1 - 1
build.properties

@@ -7,7 +7,7 @@ distdir = dist
 
 build.major = 2
 build.minor = 2
-build.revision = 48
+build.revision = 49
 
 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.2.48",
+    "version": "2.2.49",
     "main": "./dist/jquery.inputmask.bundle.js",
     "dependencies": {
         "jquery": ">=1.5"

+ 6 - 6
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.2.48
+* Version: 2.2.49
 */
 
 (function ($) {
@@ -939,7 +939,7 @@
                     }
                     if (activeElement === el) { //position the caret when in focus
                         $input.addClass('focus.inputmask');
-                        caret(el, getActiveMaskSet()["lastValidPosition"]);
+                        caret(el, getActiveMaskSet()["p"]);
                     } else if (opts.clearMaskOnLostFocus) {
                         if (getActiveBuffer().join('') == getActiveBufferTemplate().join('')) {
                             el._valueSet('');
@@ -1474,7 +1474,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.2.48
+Version: 2.2.49
 
 Optional extensions on the jquery.inputmask base
 */
@@ -1575,7 +1575,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.2.48
+Version: 2.2.49
 
 Optional extensions on the jquery.inputmask base
 */
@@ -2043,7 +2043,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.2.48
+Version: 2.2.49
 
 Optional extensions on the jquery.inputmask base
 */
@@ -2205,7 +2205,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.2.48
+Version: 2.2.49
 
 Regex extensions on the jquery.inputmask base
 Allows for using regular expressions as a mask

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


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


+ 1 - 1
jquery.inputmask.jquery.json

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

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

@@ -3,7 +3,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: 0.0.0
+Version: 2.2.49
 
 Optional extensions on the jquery.inputmask base
 */

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

@@ -3,7 +3,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: 0.0.0
+Version: 2.2.49
 
 Optional extensions on the jquery.inputmask base
 */

+ 2 - 2
js/jquery.inputmask.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: 0.0.0
+* Version: 2.2.49
 */
 
 (function ($) {
@@ -939,7 +939,7 @@
                     }
                     if (activeElement === el) { //position the caret when in focus
                         $input.addClass('focus.inputmask');
-                        caret(el, getActiveMaskSet()["lastValidPosition"]);
+                        caret(el, getActiveMaskSet()["p"]);
                     } else if (opts.clearMaskOnLostFocus) {
                         if (getActiveBuffer().join('') == getActiveBufferTemplate().join('')) {
                             el._valueSet('');

+ 1 - 1
js/jquery.inputmask.numeric.extensions.js

@@ -3,7 +3,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: 0.0.0
+Version: 2.2.49
 
 Optional extensions on the jquery.inputmask base
 */

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

@@ -3,7 +3,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: 0.0.0
+Version: 2.2.49
 
 Regex extensions on the jquery.inputmask base
 Allows for using regular expressions as a mask