mirror of
https://github.com/tenrok/maska.git
synced 2026-06-05 16:42:28 +03:00
Fix setSelectionRange error for inputs of some types
This commit is contained in:
+4
-1
@@ -127,7 +127,10 @@ export class MaskInput {
|
||||
e.inputType.startsWith('delete') ||
|
||||
(ss != null && ss < valueOld.length)
|
||||
) {
|
||||
input.setSelectionRange(ss, se)
|
||||
try {
|
||||
// see https://github.com/beholdr/maska/issues/118
|
||||
input.setSelectionRange(ss, se)
|
||||
} catch {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user