ソースを参照

fix paste event

Robin Herbots 12 年 前
コミット
4eb6e01299

+ 1 - 1
build.properties

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

+ 9 - 8
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.36
+* Version: 2.2.37
 */
 
 (function ($) {
@@ -910,11 +910,12 @@
                     ).bind("keypress.inputmask", keypressEvent
                     ).bind("keyup.inputmask", keyupEvent
                     ).bind(pasteEvent + ".inputmask dragdrop.inputmask drop.inputmask", function () {
-                        var input = this, buffer = getActiveBuffer();
+                        var input = this, $input = $(input);
                         setTimeout(function () {
-                            caret(input, checkVal(input, true, false));
-                            if (isComplete(buffer))
+                            checkVal(input, true, false);
+                            if (isComplete(getActiveBuffer()))
                                 $input.trigger("complete");
+                            $input.click();    
                         }, 0);
                     }).bind('setvalue.inputmask', function () {
                         var input = this;
@@ -1463,7 +1464,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.36
+Version: 2.2.37
 
 Optional extensions on the jquery.inputmask base
 */
@@ -1560,7 +1561,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.36
+Version: 2.2.37
 
 Optional extensions on the jquery.inputmask base
 */
@@ -2053,7 +2054,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.36
+Version: 2.2.37
 
 Optional extensions on the jquery.inputmask base
 */
@@ -2215,7 +2216,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.36
+Version: 2.2.37
 
 Regex extensions on the jquery.inputmask base
 Allows for using regular expressions as a mask

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


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


+ 1 - 1
jquery.inputmask.jquery.json

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

+ 4 - 3
js/jquery.inputmask.js

@@ -910,11 +910,12 @@
                     ).bind("keypress.inputmask", keypressEvent
                     ).bind("keyup.inputmask", keyupEvent
                     ).bind(pasteEvent + ".inputmask dragdrop.inputmask drop.inputmask", function () {
-                        var input = this, buffer = getActiveBuffer();
+                        var input = this, $input = $(input);
                         setTimeout(function () {
-                            caret(input, checkVal(input, true, false));
-                            if (isComplete(buffer))
+                            checkVal(input, true, false);
+                            if (isComplete(getActiveBuffer()))
                                 $input.trigger("complete");
+                            $input.click();    
                         }, 0);
                     }).bind('setvalue.inputmask', function () {
                         var input = this;