local lnStart, lnLenght lnStart = this.SelStart lnLength = this.SelLength this.value = proper( this.value ) this.SelStart = lnStart this.SelLength = lnLengthThe SelStart thing is because every time you reassign the value, otherwise, the cursor gets again to the start of the field.