Fix error caused by wrong selection and text pasting
Given fix is a direct result of a previous fix (v1.0.12), which caused a new problem.
Previously when a user deleted a letter placed after a mask and just before the last letter in the phrase, cursor was unexpectedly placed after the last letter.
Fixing above issue resulted in the next issue, which allowed user to position cursor wherever possible given that the input is empty.
After positioning cursor on an empty input (with visible hint) and pasting value into it, the crash occurred.
In this fix I handle this crash by catching exception and reseting the input.
It is sort of a workaround and definitely not a perfect solution