Skip to content

Commit 62ca6f6

Browse files
author
Igor Escobar
committed
generating jquery mask files v1.14.14
1 parent 25d8d68 commit 62ca6f6

File tree

7 files changed

+33
-28
lines changed

7 files changed

+33
-28
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jquery-mask-plugin",
3-
"version": "1.14.13",
3+
"version": "1.14.14",
44
"main": "dist/jquery.mask.js",
55
"ignore": [
66
"deploy.rb",

component.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "jQuery-Mask-Plugin",
33
"description": "A jQuery Plugin to make masks on form fields and HTML elements.",
4-
"version": "1.14.13",
4+
"version": "1.14.14",
55
"keywords": ["javascript", "mask", "form"],
66
"scripts": [
77
"dist/jquery.mask.js"

dist/jquery.mask.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* jquery.mask.js
3-
* @version: v1.14.13
3+
* @version: v1.14.14
44
* @author: Igor Escobar
55
*
66
* Created by Igor Escobar on 2012-03-10. Please report any bug at github.com/igorescobar/jQuery-Mask-Plugin
@@ -254,17 +254,15 @@
254254
var keyCode = el.data('mask-keycode');
255255

256256
if ($.inArray(keyCode, jMask.byPassKeys) === -1) {
257-
var newVal = p.getMasked(),
258-
caretPos = p.getCaret();
257+
var newVal = p.getMasked();
259258

260259
// this is a compensation to devices/browsers that don't compensate
261260
// caret positioning the right way
262261
setTimeout(function() {
263262
p.setCaret(p.calculateCaretPosition());
264-
}, 10);
263+
}, $.jMaskGlobals.keyStrokeCompensation);
265264

266265
p.val(newVal);
267-
p.setCaret(caretPos);
268266
return p.callbacks(e);
269267
}
270268
},
@@ -395,6 +393,12 @@
395393
jMask.options = options;
396394
jMask.remove = function() {
397395
var caret = p.getCaret();
396+
if (jMask.options.placeholder) {
397+
el.removeAttr('placeholder');
398+
}
399+
if (el.data('mask-maxlength')) {
400+
el.removeAttr('maxlength');
401+
}
398402
p.destroyEvents();
399403
p.val(jMask.getCleanVal());
400404
p.setCaret(caret);
@@ -449,7 +453,7 @@
449453
}
450454

451455
if (maxlength) {
452-
el.attr('maxlength', mask.length);
456+
el.attr('maxlength', mask.length).data('mask-maxlength', true);
453457
}
454458

455459
p.destroyEvents();
@@ -568,6 +572,7 @@
568572
dataMask: true,
569573
watchInterval: 300,
570574
watchInputs: true,
575+
keyStrokeCompensation: 10,
571576
// old versions of chrome dont work great with input event
572577
useInput: !/Chrome\/[2-4][0-9]|SamsungBrowser/.test(window.navigator.userAgent) && eventSupported('input'),
573578
watchDataMask: false,

dist/jquery.mask.min.js

Lines changed: 17 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package.describe({
22
"name": "igorescobar:jquery-mask-plugin",
3-
"version": "1.14.13",
3+
"version": "1.14.14",
44
"summary": "A jQuery Plugin to make masks on form fields and HTML elements.",
55
"git": "git@github.com:igorescobar/jQuery-Mask-Plugin.git",
66
"documentation": "README.md"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jquery-mask-plugin",
3-
"version": "1.14.13",
3+
"version": "1.14.14",
44
"description": "A jQuery Plugin to make masks on form fields and html elements.",
55
"author": "Igor Escobar <blog@igorescobar.com>",
66
"homepage": "http://igorescobar.github.io/jQuery-Mask-Plugin/",

src/jquery.mask.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* jquery.mask.js
3-
* @version: v1.14.13
3+
* @version: v1.14.14
44
* @author: Igor Escobar
55
*
66
* Created by Igor Escobar on 2012-03-10. Please report any bug at github.com/igorescobar/jQuery-Mask-Plugin

0 commit comments

Comments
 (0)