2
0
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:
Alexander Shabunevich
2023-01-12 23:55:43 +03:00
parent d7bb09b16c
commit 6135d0a193
+4 -1
View File
@@ -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 {}
}
}
}