ソースを参照

fix for FF/Linux latin charset #192

Robin Herbots 11 年 前
コミット
2e1e2bef7c

+ 1 - 1
bower.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "jquery.inputmask",
   "name": "jquery.inputmask",
-  "version": "3.0.61",
+  "version": "3.0.62",
   "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 = 61
+build.revision = 62
 
 
 target = jquery.inputmask.bundle.js
 target = jquery.inputmask.bundle.js
 target.min = jquery.inputmask.bundle.min.js
 target.min = jquery.inputmask.bundle.min.js

+ 32 - 23
dist/jquery.inputmask.bundle.js

@@ -3,12 +3,12 @@
 * 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.61
+* Version: 3.0.62
 */
 */
 
 
 (function (factory) {
 (function (factory) {
     if (typeof define === 'function' && define.amd) {
     if (typeof define === 'function' && define.amd) {
-        define("jquery.inputmask", ['jquery'], factory);
+        define(['jquery'], factory);
     } else {
     } else {
         factory(jQuery);
         factory(jQuery);
     }
     }
@@ -1267,10 +1267,6 @@
                             var keypressResult = opts.onKeyPress.call(this, e, getBuffer(), currentCaretPos.begin, opts);
                             var keypressResult = opts.onKeyPress.call(this, e, getBuffer(), currentCaretPos.begin, opts);
                             handleOnKeyResult(input, keypressResult, currentCaretPos);
                             handleOnKeyResult(input, keypressResult, currentCaretPos);
                         }
                         }
-                        var temp;
-                        for (var i in getMaskSet().validPositions) {
-                            temp += " " + i;
-                        }
                     }
                     }
                 }
                 }
             }
             }
@@ -1344,6 +1340,18 @@
                 }
                 }
                 e.preventDefault();
                 e.preventDefault();
             }
             }
+            function compositionupdateEvent(e) {
+                var that = this;
+                setTimeout(function () {
+                    caret(that, caret(that).begin - 1);
+                    var keypress = $.Event("keypress");
+                    keypress.which = e.originalEvent.data.charCodeAt(0);
+                    keypressEvent.call(that, keypress, undefined, undefined, false);
+                    var forwardPosition = getMaskSet()["p"];
+                    writeBuffer(that, getBuffer(), opts.numericInput ? seekPrevious(forwardPosition) : forwardPosition);
+                }, 0);
+                return false;
+            }
 
 
             function mask(el) {
             function mask(el) {
                 $el = $(el);
                 $el = $(el);
@@ -1473,11 +1481,12 @@
                         valueOnFocus = getBuffer().join('');
                         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);
-
-                    $el.bind("keydown.inputmask", keydownEvent
-                    ).bind("keypress.inputmask", keypressEvent
-                    ).bind("keyup.inputmask", keyupEvent);
+                    ).bind('cleared.inputmask', opts.oncleared);
+
+                    $el.bind("keydown.inputmask", keydownEvent
+                    ).bind("keypress.inputmask", keypressEvent
+                    ).bind("keyup.inputmask", keyupEvent
+                    ).bind("compositionupdate.inputmask", compositionupdateEvent);
 
 
                     if (android || androidfirefox || androidchrome || kindle) {
                     if (android || androidfirefox || androidchrome || kindle) {
                         if (PasteEventType == "input") {
                         if (PasteEventType == "input") {
@@ -1812,7 +1821,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.61
+* Version: 3.0.62
 *
 *
 *  THIS IS A TEMPORARY HACK TO BE COMPATIBLE WITH MULTIPLE MASKS LIKE IN VERSION 2.X - WHEN THE ALTERNATOR SYNTAX IS IMPLEMENTED inputmask-multi WILL BE DELETED!!
 *  THIS IS A TEMPORARY HACK TO BE COMPATIBLE WITH MULTIPLE MASKS LIKE IN VERSION 2.X - WHEN THE ALTERNATOR SYNTAX IS IMPLEMENTED inputmask-multi WILL BE DELETED!!
 *
 *
@@ -1820,7 +1829,7 @@
 */
 */
 (function (factory) {
 (function (factory) {
     if (typeof define === 'function' && define.amd) {
     if (typeof define === 'function' && define.amd) {
-        define("jquery.inputmask-multi", ['jquery', 'jquery.inputmask'], factory);
+        define(['jquery', './jquery.inputmask'], factory);
     } else {
     } else {
         factory(jQuery);
         factory(jQuery);
     }
     }
@@ -2117,13 +2126,13 @@ 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.61
+Version: 3.0.62
 
 
 Optional extensions on the jquery.inputmask base
 Optional extensions on the jquery.inputmask base
 */
 */
 (function (factory) {
 (function (factory) {
     if (typeof define === 'function' && define.amd) {
     if (typeof define === 'function' && define.amd) {
-        define("jquery.inputmask.extensions", ['jquery', 'jquery.inputmask'], factory);
+        define(['jquery', './jquery.inputmask'], factory);
     } else {
     } else {
         factory(jQuery);
         factory(jQuery);
     }
     }
@@ -2244,13 +2253,13 @@ 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.61
+Version: 3.0.62
 
 
 Optional extensions on the jquery.inputmask base
 Optional extensions on the jquery.inputmask base
 */
 */
 (function (factory) {
 (function (factory) {
     if (typeof define === 'function' && define.amd) {
     if (typeof define === 'function' && define.amd) {
-        define("jquery.inputmask.date.extensions", ['jquery', 'jquery.inputmask'], factory);
+        define(['jquery', './jquery.inputmask'], factory);
     } else {
     } else {
         factory(jQuery);
         factory(jQuery);
     }
     }
@@ -2738,13 +2747,13 @@ 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.61
+Version: 3.0.62
 
 
 Optional extensions on the jquery.inputmask base
 Optional extensions on the jquery.inputmask base
 */
 */
 (function (factory) {
 (function (factory) {
     if (typeof define === 'function' && define.amd) {
     if (typeof define === 'function' && define.amd) {
-        define("jquery.inputmask.numeric.extensions", ['jquery', 'jquery.inputmask'], factory);
+        define(['jquery', './jquery.inputmask'], factory);
     } else {
     } else {
         factory(jQuery);
         factory(jQuery);
     }
     }
@@ -2996,14 +3005,14 @@ 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.61
+Version: 3.0.62
 
 
 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
 */
 */
 (function (factory) {
 (function (factory) {
     if (typeof define === 'function' && define.amd) {
     if (typeof define === 'function' && define.amd) {
-        define("jquery.inputmask.regex.extensions", ['jquery', 'jquery.inputmask'], factory);
+        define(['jquery', './jquery.inputmask'], factory);
     } else {
     } else {
         factory(jQuery);
         factory(jQuery);
     }
     }
@@ -3189,7 +3198,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.61
+Version: 3.0.62
 
 
 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
@@ -3205,7 +3214,7 @@ When using this extension make sure you specify the correct url to get the masks
 */
 */
 (function (factory) {
 (function (factory) {
     if (typeof define === 'function' && define.amd) {
     if (typeof define === 'function' && define.amd) {
-        define("jquery.inputmask.phone.extensions", ['jquery', 'jquery.inputmask'], factory);
+        define(['jquery', './jquery.inputmask'], factory);
     } else {
     } else {
         factory(jQuery);
         factory(jQuery);
     }
     }

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


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


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


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


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


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


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


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


+ 1 - 1
jquery.inputmask.jquery.json

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

+ 18 - 9
js/jquery.inputmask.js

@@ -1267,10 +1267,6 @@
                             var keypressResult = opts.onKeyPress.call(this, e, getBuffer(), currentCaretPos.begin, opts);
                             var keypressResult = opts.onKeyPress.call(this, e, getBuffer(), currentCaretPos.begin, opts);
                             handleOnKeyResult(input, keypressResult, currentCaretPos);
                             handleOnKeyResult(input, keypressResult, currentCaretPos);
                         }
                         }
-                        var temp;
-                        for (var i in getMaskSet().validPositions) {
-                            temp += " " + i;
-                        }
                     }
                     }
                 }
                 }
             }
             }
@@ -1344,6 +1340,18 @@
                 }
                 }
                 e.preventDefault();
                 e.preventDefault();
             }
             }
+            function compositionupdateEvent(e) {
+                var that = this;
+                setTimeout(function () {
+                    caret(that, caret(that).begin - 1);
+                    var keypress = $.Event("keypress");
+                    keypress.which = e.originalEvent.data.charCodeAt(0);
+                    keypressEvent.call(that, keypress, undefined, undefined, false);
+                    var forwardPosition = getMaskSet()["p"];
+                    writeBuffer(that, getBuffer(), opts.numericInput ? seekPrevious(forwardPosition) : forwardPosition);
+                }, 0);
+                return false;
+            }
 
 
             function mask(el) {
             function mask(el) {
                 $el = $(el);
                 $el = $(el);
@@ -1473,11 +1481,12 @@
                         valueOnFocus = getBuffer().join('');
                         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);
-
-                    $el.bind("keydown.inputmask", keydownEvent
-                    ).bind("keypress.inputmask", keypressEvent
-                    ).bind("keyup.inputmask", keyupEvent);
+                    ).bind('cleared.inputmask', opts.oncleared);
+
+                    $el.bind("keydown.inputmask", keydownEvent
+                    ).bind("keypress.inputmask", keypressEvent
+                    ).bind("keyup.inputmask", keyupEvent
+                    ).bind("compositionupdate.inputmask", compositionupdateEvent);
 
 
                     if (android || androidfirefox || androidchrome || kindle) {
                     if (android || androidfirefox || androidchrome || kindle) {
                         if (PasteEventType == "input") {
                         if (PasteEventType == "input") {

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "jquery.inputmask",
   "name": "jquery.inputmask",
-  "version": "3.0.61",
+  "version": "3.0.62",
   "description": "jquery.inputmask is a jquery plugin which create an input mask.",
   "description": "jquery.inputmask is a jquery plugin which create an input mask.",
   "main": "dist/jquery.inputmask.bundle.js",
   "main": "dist/jquery.inputmask.bundle.js",
   "scripts": {
   "scripts": {