Robin Herbots 11 年 前
コミット
bd7da9bf5c

+ 1 - 1
bower.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "jquery.inputmask",
   "name": "jquery.inputmask",
-  "version": "3.0.55",
+  "version": "3.0.56",
   "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 = 55
+build.revision = 56
 
 
 target = jquery.inputmask.bundle.js
 target = jquery.inputmask.bundle.js
 target.min = jquery.inputmask.bundle.min.js
 target.min = jquery.inputmask.bundle.min.js

+ 22 - 25
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.55
+* Version: 3.0.56
 */
 */
 
 
 (function ($) {
 (function ($) {
@@ -1384,9 +1384,7 @@
                     ).bind('setvalue.inputmask', function () {
                     ).bind('setvalue.inputmask', function () {
                         var input = this;
                         var input = this;
                         checkVal(input, true);
                         checkVal(input, true);
-                        valueOnFocus = getBuffer().join('');
-                        if (input._valueGet() == getBufferTemplate().join(''))
-                            input._valueSet('');
+                        valueOnFocus = getBuffer().join('');
                     }).bind('complete.inputmask', opts.oncomplete
                     }).bind('complete.inputmask', opts.oncomplete
                     ).bind('incomplete.inputmask', opts.onincomplete
                     ).bind('incomplete.inputmask', opts.onincomplete
                     ).bind('cleared.inputmask', opts.oncleared);
                     ).bind('cleared.inputmask', opts.oncleared);
@@ -1415,23 +1413,22 @@
                         activeElement = document.activeElement;
                         activeElement = document.activeElement;
                     } catch (e) {
                     } catch (e) {
                     }
                     }
+                    if (isComplete(getBuffer()) === false) {
+                        if (opts.clearIncomplete)
+                            resetMaskSet();
+                    }
+                    if (opts.clearMaskOnLostFocus) {
+                        if (getBuffer().join('') == getBufferTemplate().join('')) {
+                            el._valueSet('');
+                        } else {
+                            clearOptionalTail(el);
+                        }
+                    } else {
+                        writeBuffer(el, getBuffer());
+                    }
                     if (activeElement === el) { //position the caret when in focus
                     if (activeElement === el) { //position the caret when in focus
                         $el.addClass('focus-inputmask');
                         $el.addClass('focus-inputmask');
                         caret(el, seekNext(getLastValidPosition()));
                         caret(el, seekNext(getLastValidPosition()));
-                    } else {
-                        if (isComplete(getBuffer()) === false) {
-                            if (opts.clearIncomplete)
-                                resetMaskSet();
-                        }
-                        if (opts.clearMaskOnLostFocus) {
-                            if (getBuffer().join('') == getBufferTemplate().join('')) {
-                                el._valueSet('');
-                            } else {
-                                clearOptionalTail(el);
-                            }
-                        } else {
-                            writeBuffer(el, getBuffer());
-                        }
                     }
                     }
 
 
                     installEventRuler(el);
                     installEventRuler(el);
@@ -1726,7 +1723,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.55
+* Version: 3.0.56
 */
 */
 
 
 (function ($) {
 (function ($) {
@@ -2089,7 +2086,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.55
+Version: 3.0.56
 
 
 Optional extensions on the jquery.inputmask base
 Optional extensions on the jquery.inputmask base
 */
 */
@@ -2210,7 +2207,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.55
+Version: 3.0.56
 
 
 Optional extensions on the jquery.inputmask base
 Optional extensions on the jquery.inputmask base
 */
 */
@@ -2698,7 +2695,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.55
+Version: 3.0.56
 
 
 Optional extensions on the jquery.inputmask base
 Optional extensions on the jquery.inputmask base
 */
 */
@@ -2747,7 +2744,7 @@ Optional extensions on the jquery.inputmask base
             prefix: "",
             prefix: "",
             suffix: "",
             suffix: "",
             rightAlign: true,
             rightAlign: true,
-            postFormat: function (buffer, pos, reformatOnly, opts) {
+            postFormat: function (buffer, pos, reformatOnly, opts) {  //this needs to be removed // this is crap
                 var needsRefresh = false, charAtPos = buffer[pos];
                 var needsRefresh = false, charAtPos = buffer[pos];
                 if (opts.groupSeparator == "" ||
                 if (opts.groupSeparator == "" ||
                     ($.inArray(opts.radixPoint, buffer) != -1 && pos >= $.inArray(opts.radixPoint, buffer)) ||
                     ($.inArray(opts.radixPoint, buffer) != -1 && pos >= $.inArray(opts.radixPoint, buffer)) ||
@@ -2942,7 +2939,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.55
+Version: 3.0.56
 
 
 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
@@ -3129,7 +3126,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.55
+Version: 3.0.56
 
 
 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

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


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


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


+ 1 - 1
jquery.inputmask.jquery.json

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

+ 14 - 17
js/jquery.inputmask.js

@@ -1384,9 +1384,7 @@
                     ).bind('setvalue.inputmask', function () {
                     ).bind('setvalue.inputmask', function () {
                         var input = this;
                         var input = this;
                         checkVal(input, true);
                         checkVal(input, true);
-                        valueOnFocus = getBuffer().join('');
-                        if (input._valueGet() == getBufferTemplate().join(''))
-                            input._valueSet('');
+                        valueOnFocus = getBuffer().join('');
                     }).bind('complete.inputmask', opts.oncomplete
                     }).bind('complete.inputmask', opts.oncomplete
                     ).bind('incomplete.inputmask', opts.onincomplete
                     ).bind('incomplete.inputmask', opts.onincomplete
                     ).bind('cleared.inputmask', opts.oncleared);
                     ).bind('cleared.inputmask', opts.oncleared);
@@ -1415,23 +1413,22 @@
                         activeElement = document.activeElement;
                         activeElement = document.activeElement;
                     } catch (e) {
                     } catch (e) {
                     }
                     }
+                    if (isComplete(getBuffer()) === false) {
+                        if (opts.clearIncomplete)
+                            resetMaskSet();
+                    }
+                    if (opts.clearMaskOnLostFocus) {
+                        if (getBuffer().join('') == getBufferTemplate().join('')) {
+                            el._valueSet('');
+                        } else {
+                            clearOptionalTail(el);
+                        }
+                    } else {
+                        writeBuffer(el, getBuffer());
+                    }
                     if (activeElement === el) { //position the caret when in focus
                     if (activeElement === el) { //position the caret when in focus
                         $el.addClass('focus-inputmask');
                         $el.addClass('focus-inputmask');
                         caret(el, seekNext(getLastValidPosition()));
                         caret(el, seekNext(getLastValidPosition()));
-                    } else {
-                        if (isComplete(getBuffer()) === false) {
-                            if (opts.clearIncomplete)
-                                resetMaskSet();
-                        }
-                        if (opts.clearMaskOnLostFocus) {
-                            if (getBuffer().join('') == getBufferTemplate().join('')) {
-                                el._valueSet('');
-                            } else {
-                                clearOptionalTail(el);
-                            }
-                        } else {
-                            writeBuffer(el, getBuffer());
-                        }
                     }
                     }
 
 
                     installEventRuler(el);
                     installEventRuler(el);

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

@@ -52,7 +52,7 @@ Optional extensions on the jquery.inputmask base
             prefix: "",
             prefix: "",
             suffix: "",
             suffix: "",
             rightAlign: true,
             rightAlign: true,
-            postFormat: function (buffer, pos, reformatOnly, opts) {
+            postFormat: function (buffer, pos, reformatOnly, opts) {  //this needs to be removed // this is crap
                 var needsRefresh = false, charAtPos = buffer[pos];
                 var needsRefresh = false, charAtPos = buffer[pos];
                 if (opts.groupSeparator == "" ||
                 if (opts.groupSeparator == "" ||
                     ($.inArray(opts.radixPoint, buffer) != -1 && pos >= $.inArray(opts.radixPoint, buffer)) ||
                     ($.inArray(opts.radixPoint, buffer) != -1 && pos >= $.inArray(opts.radixPoint, buffer)) ||