react-redux-form
react-redux-form copied to clipboard
Formatters and Parsers. Android cursor position issue
Hey David. I've seen and solved this issue in other codebases before. When using a formatter there is a timing issue with droid keypress as it is not expecting non-typed characters to be added to the input. Wanted to make sure you were aware. I can look to make a PR if i can find where to properly place the code
Please do, that would be greatly appreciated.
@davidkpiano I ended up having to add this. Not sure where all in the factory to add this.
onChange={e => { //this only exists for old droid issue if (typeof navigator !== 'undefined' && navigator.userAgent.match(/Android/i)) { setTimeout(() => { e.target.selectionStart = e.target.value.length; e.target.selectionEnd = e.target.value.length; }, 0); } } }