2
0
mirror of https://github.com/tenrok/maska.git synced 2026-06-02 16:04:05 +03:00

Fix cursor jumps when editing first symbol

This commit is contained in:
Alexander Shabunevich
2020-09-13 21:23:33 +03:00
parent 22e9e7786d
commit bb62516640
9 changed files with 15 additions and 15 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ function findInputElement (el) {
}
function fixInputSelection (el, position, digit) {
while (position < el.value.length && el.value.charAt(position - 1) !== digit) {
while (position && position < el.value.length && el.value.charAt(position - 1) !== digit) {
position++
}