ソースを参照

optimize eventruler

Robin Herbots 12 年 前
コミット
e32f2cb9ee

+ 1 - 1
build.properties

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

BIN
dist/jQuery.InputMask.2.2.13.nupkg


+ 8 - 7
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.12
+* Version: 2.2.13
 */
 
 (function ($) {
@@ -959,10 +959,11 @@
                         $.each(eventHandlers, function (ndx, eventHandler) {
                             if (eventHandler.namespace == "inputmask") {
                                 var handler = eventHandler.handler;
-                                eventHandler.handler = function () {
+                                eventHandler.handler = function (e) {
                                     if (this.readOnly || this.disabled)
-                                        return false;
-                                    return handler.apply(this, arguments);
+                                        e.preventDefault;
+                                    else
+                                        return handler.apply(this, arguments);
                                 };
                             }
                         });
@@ -1347,7 +1348,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.12
+Version: 2.2.13
 
 Optional extensions on the jquery.inputmask base
 */
@@ -1444,7 +1445,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.12
+Version: 2.2.13
 
 Optional extensions on the jquery.inputmask base
 */
@@ -1937,7 +1938,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.12
+Version: 2.2.13
 
 Optional extensions on the jquery.inputmask base
 */

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


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


+ 1 - 1
jquery.inputmask.jquery.json

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

+ 4 - 3
js/jquery.inputmask.js

@@ -959,10 +959,11 @@
                         $.each(eventHandlers, function (ndx, eventHandler) {
                             if (eventHandler.namespace == "inputmask") {
                                 var handler = eventHandler.handler;
-                                eventHandler.handler = function () {
+                                eventHandler.handler = function (e) {
                                     if (this.readOnly || this.disabled)
-                                        return false;
-                                    return handler.apply(this, arguments);
+                                        e.preventDefault;
+                                    else
+                                        return handler.apply(this, arguments);
                                 };
                             }
                         });