浏览代码

fix for <CTRL> X key combination

Robin Herbots 14 年之前
父节点
当前提交
460eab1ea6
共有 1 个文件被更改,包括 5 次插入8 次删除
  1. 5 8
      jquery.inputmask.js

+ 5 - 8
jquery.inputmask.js

@@ -3,7 +3,7 @@ Input Mask plugin for jquery
 http://github.com/RobinHerbots/jquery.inputmask
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 Robin Herbots
 Copyright (c) 2010 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: 0.5.3a
+Version: 0.5.3b
  
  
 This plugin is based on the masked input plugin written by Josh Bush (digitalbush.com)
 This plugin is based on the masked input plugin written by Josh Bush (digitalbush.com)
 */
 */
@@ -411,13 +411,6 @@ This plugin is based on the masked input plugin written by Josh Bush (digitalbus
                 writeBuffer(input, tmpBuffer);
                 writeBuffer(input, tmpBuffer);
             }
             }
 
 
-            function _val(value) {
-                var npt = this.jquery && this.length > 0 ? this[0] : this;
-                if (value != undefined)
-                    npt._valueSet(value);
-                else return npt._valueGet();
-            }
-
             //functionality fn
             //functionality fn
             function unmaskedvalue($input, skipDatepickerCheck) {
             function unmaskedvalue($input, skipDatepickerCheck) {
                 var input = $input[0];
                 var input = $input[0];
@@ -759,6 +752,10 @@ This plugin is based on the masked input plugin written by Josh Bush (digitalbus
                         opts.insertMode = !opts.insertMode;
                         opts.insertMode = !opts.insertMode;
                         caret(input, !opts.insertMode && pos.begin == getMaskLength() ? pos.begin - 1 : pos.begin);
                         caret(input, !opts.insertMode && pos.begin == getMaskLength() ? pos.begin - 1 : pos.begin);
                         return false;
                         return false;
+                    } else if (e.ctrlKey && k == 88) {
+                        setTimeout(function() {
+                            caret(input, checkVal(input, buffer, true));
+                        }, 0);
                     }
                     }
                     else if (!opts.insertMode) { //overwritemode
                     else if (!opts.insertMode) { //overwritemode
                         if (k == opts.keyCode.RIGHT) {//right
                         if (k == opts.keyCode.RIGHT) {//right