|
|
@@ -663,7 +663,7 @@
|
|
|
if ("inputmask" == eventHandler.namespace && "setvalue" != eventHandler.type) {
|
|
|
var handler = eventHandler.handler;
|
|
|
eventHandler.handler = function(e) {
|
|
|
- if (!this.readOnly && !this.disabled) {
|
|
|
+ if (!this.disabled && (!this.readOnly || "keydown" == e.type && e.ctrlKey && 67 == e.keyCode)) {
|
|
|
switch (e.type) {
|
|
|
case "input":
|
|
|
if (skipInputEvent === !0) return skipInputEvent = !1, e.preventDefault();
|
|
|
@@ -1838,7 +1838,7 @@
|
|
|
opts.definitions[";"] = opts.definitions["~"];
|
|
|
var mask = autoEscape(opts.prefix);
|
|
|
return mask += "[+]", mask += "~{1," + opts.integerDigits + "}", void 0 != opts.digits && (isNaN(opts.digits) || parseInt(opts.digits) > 0) && (mask += opts.digitsOptional ? "[" + (opts.decimalProtect ? ":" : opts.radixPoint) + ";{" + opts.digits + "}]" : (opts.decimalProtect ? ":" : opts.radixPoint) + ";{" + opts.digits + "}"),
|
|
|
- mask += autoEscape(opts.suffix);
|
|
|
+ mask += autoEscape(opts.suffix), opts.greedy = !1, mask;
|
|
|
},
|
|
|
placeholder: "",
|
|
|
greedy: !1,
|
|
|
@@ -1885,7 +1885,7 @@
|
|
|
onBeforeWrite: function(e, buffer, caretPos, opts) {
|
|
|
if (e && "blur" == e.type) {
|
|
|
var tmpBufSplit = "" != opts.radixPoint ? buffer.join("").split(opts.radixPoint) : [ buffer.join("") ], matchRslt = tmpBufSplit[0].match(opts.regex.integerPart(opts)), matchRsltDigits = 2 == tmpBufSplit.length ? tmpBufSplit[1].match(opts.regex.integerNPart(opts)) : void 0;
|
|
|
- matchRslt && "-0" == matchRslt[0] && (void 0 == matchRsltDigits || matchRsltDigits[0].match(/^0+$/)) && buffer.splice(0, 1);
|
|
|
+ matchRslt && "-0" == matchRslt[0] && (void 0 == matchRsltDigits || matchRsltDigits[0].match(/^0+$/)) && buffer.splice(matchRslt.index, 1);
|
|
|
var radixPosition = $.inArray(opts.radixPoint, buffer);
|
|
|
if (-1 != radixPosition && isFinite(opts.digits) && !opts.digitsOptional) {
|
|
|
for (var i = 1; i <= opts.digits; i++) (void 0 == buffer[radixPosition + i] || buffer[radixPosition + i] == opts.placeholder.charAt(0)) && (buffer[radixPosition + i] = "0");
|
|
|
@@ -1911,7 +1911,7 @@
|
|
|
signHandler: function(chrs, maskset, pos, strict, opts) {
|
|
|
if (!strict && (opts.allowMinus && "-" === chrs || opts.allowPlus && "+" === chrs)) {
|
|
|
var matchRslt = maskset.buffer.join("").match(opts.regex.integerPart(opts));
|
|
|
- if (matchRslt && matchRslt[0].length > 0 && ("0" !== matchRslt[0] || maskset.buffer && maskset._buffer && maskset.buffer.join("") != maskset._buffer.join(""))) return maskset.buffer[matchRslt.index] == ("-" === chrs ? "+" : "-") ? {
|
|
|
+ if (matchRslt && matchRslt[0].length > 0) return maskset.buffer[matchRslt.index] == ("-" === chrs ? "+" : "-") ? {
|
|
|
pos: matchRslt.index,
|
|
|
c: chrs,
|
|
|
remove: matchRslt.index,
|