blackbing / react-numeral-input

It is a very tiny component which is a replacement of HTML input element for post-editing format of number values. ex. 1000000 -> 1,000,000
http://blackbing.github.io/react-numeral-input/
MIT License
11 stars 4 forks source link

cursor jumps to end when typing #2

Closed aktxyz closed 9 years ago

aktxyz commented 9 years ago

I notice when you try to edit a number and are not at the end of the input field, the cursor will jump to the end of the field when you press a key. Would likely use this without that issue.

blackbing commented 9 years ago

Yea, I'm figuring out how to solve this problem, will update soon.

blackbing commented 9 years ago

the main idea is to save the cursor's point and reset the cursor at the right place after typing. @aktxyz could you please help to check if it fixed in your project? the version is 0.1.2.