File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 228
228
}
229
229
}
230
230
231
+ // if the cursor is at the end keep it there
231
232
if ( caretPosNew > oldValL ) {
232
- // if the cursor is at the end keep it there
233
233
caretPosNew = newValL * 10 ;
234
- }
235
- else if ( caretPosOld >= caretPosNew && caretPosOld !== oldValL ) {
234
+ } else if ( caretPosOld >= caretPosNew && caretPosOld !== oldValL ) {
236
235
if ( ! p . maskDigitPosMapOld [ caretPosNew ] ) {
237
236
var caretPos = caretPosNew ;
238
237
caretPosNew -= maskDigitsBeforeCaretAllOld - maskDigitsBeforeCaretAll ;
259
258
var newVal = p . getMasked ( ) ,
260
259
caretPos = p . getCaret ( ) ;
261
260
261
+ // this is a compensation to devices/browsers that don't compensate
262
+ // caret positioning the right way
262
263
setTimeout ( function ( ) {
263
264
p . setCaret ( p . calculateCaretPosition ( ) ) ;
264
265
} , 10 ) ;
You can’t perform that action at this time.
0 commit comments