File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 254
254
var keyCode = el . data ( 'mask-keycode' ) ;
255
255
256
256
if ( $ . inArray ( keyCode , jMask . byPassKeys ) === - 1 ) {
257
- var newVal = p . getMasked ( ) ,
258
- caretPos = p . getCaret ( ) ;
257
+ var newVal = p . getMasked ( ) ;
259
258
260
259
// this is a compensation to devices/browsers that don't compensate
261
260
// caret positioning the right way
262
261
setTimeout ( function ( ) {
263
262
p . setCaret ( p . calculateCaretPosition ( ) ) ;
264
- } , 10 ) ;
263
+ } , $ . jMaskGlobals . keyStrokeCompensation ) ;
265
264
266
265
p . val ( newVal ) ;
267
- p . setCaret ( caretPos ) ;
268
266
return p . callbacks ( e ) ;
269
267
}
270
268
} ,
568
566
dataMask : true ,
569
567
watchInterval : 300 ,
570
568
watchInputs : true ,
569
+ keyStrokeCompensation : 10 ,
571
570
// old versions of chrome dont work great with input event
572
571
useInput : ! / C h r o m e \/ [ 2 - 4 ] [ 0 - 9 ] | S a m s u n g B r o w s e r / . test ( window . navigator . userAgent ) && eventSupported ( 'input' ) ,
573
572
watchDataMask : false ,
You can’t perform that action at this time.
0 commit comments