We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d27f8b0 commit 68fcf26Copy full SHA for 68fcf26
src/jquery.mask.js
@@ -254,7 +254,8 @@
254
var keyCode = el.data('mask-keycode');
255
256
if ($.inArray(keyCode, jMask.byPassKeys) === -1) {
257
- var newVal = p.getMasked();
+ var newVal = p.getMasked(),
258
+ caretPos = p.getCaret();
259
260
// this is a compensation to devices/browsers that don't compensate
261
// caret positioning the right way
@@ -263,6 +264,7 @@
263
264
}, $.jMaskGlobals.keyStrokeCompensation);
265
266
p.val(newVal);
267
+ p.setCaret(caretPos);
268
return p.callbacks(e);
269
}
270
},
0 commit comments