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:
+1
-1
@@ -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++
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user