Skip to content

Commit bb89c43

Browse files
author
Igor Escobar
committed
generating jquery mask files v1.14.16
1 parent d84519e commit bb89c43

File tree

7 files changed

+30
-30
lines changed

7 files changed

+30
-30
lines changed

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jquery-mask-plugin",
3-
"version": "1.14.15",
3+
"version": "1.14.16",
44
"main": "dist/jquery.mask.js",
55
"ignore": [
66
"deploy.rb",

component.json

+1-1
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.15",
4+
"version": "1.14.16",
55
"keywords": ["javascript", "mask", "form"],
66
"scripts": [
77
"dist/jquery.mask.js"

dist/jquery.mask.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* jquery.mask.js
3-
* @version: v1.14.15
3+
* @version: v1.14.16
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
@@ -41,7 +41,7 @@
4141

4242
if (typeof define === 'function' && define.amd) {
4343
define(['jquery'], factory);
44-
} else if (typeof exports === 'object') {
44+
} else if (typeof exports === 'object' && typeof Meteor === 'undefined') {
4545
module.exports = factory(require('jquery'));
4646
} else {
4747
factory(jQuery || Zepto);
@@ -187,9 +187,8 @@
187187

188188
return r;
189189
},
190-
calculateCaretPosition: function() {
191-
var oldVal = el.data('mask-previus-value') || '',
192-
newVal = p.getMasked(),
190+
calculateCaretPosition: function(oldVal) {
191+
var newVal = p.getMasked(),
193192
caretPosNew = p.getCaret();
194193
if (oldVal !== newVal) {
195194
var caretPosOld = el.data('mask-previus-caret-pos') || 0,
@@ -255,12 +254,13 @@
255254

256255
if ($.inArray(keyCode, jMask.byPassKeys) === -1) {
257256
var newVal = p.getMasked(),
258-
caretPos = p.getCaret();
257+
caretPos = p.getCaret(),
258+
oldVal = el.data('mask-previus-value') || '';
259259

260260
// this is a compensation to devices/browsers that don't compensate
261261
// caret positioning the right way
262262
setTimeout(function() {
263-
p.setCaret(p.calculateCaretPosition());
263+
p.setCaret(p.calculateCaretPosition(oldVal));
264264
}, $.jMaskGlobals.keyStrokeCompensation);
265265

266266
p.val(newVal);

dist/jquery.mask.min.js

+18-18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.js

+1-1
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.15",
3+
"version": "1.14.16",
44
"summary": "A jQuery Plugin to make masks on form fields and HTML elements.",
55
"git": "[email protected]:igorescobar/jQuery-Mask-Plugin.git",
66
"documentation": "README.md"

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jquery-mask-plugin",
3-
"version": "1.14.15",
3+
"version": "1.14.16",
44
"description": "A jQuery Plugin to make masks on form fields and html elements.",
55
"author": "Igor Escobar <[email protected]>",
66
"homepage": "http://igorescobar.github.io/jQuery-Mask-Plugin/",

src/jquery.mask.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* jquery.mask.js
3-
* @version: v1.14.15
3+
* @version: v1.14.16
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)