Cursor is jumping when delete symbols from the middle of value
See original GitHub issueProblem:
When use value
property, that goes from state variable, and delete characters from the middle of value, cursor is jumping to last character.
Please, take a look at the attached gif:
OS: Android
Version: 2.0.1
How to reproduce: Example of code:
const App = () => {
const [value, setValue] = useState('');
const onChangeText = useCallback(
(formatted: string) => setValue(formatted),
[],
);
return (
<SafeAreaView>
<ScrollView>
<View>
<TextInputMask
value={value}
onChangeText={onChangeText}
mask={'+1 ([000]) [000] [00] [00]'}
style={styles.input}
/>
</View>
</ScrollView>
</SafeAreaView>
);
};
Repo to reproduce: https://github.com/abramovslava/jumping-cursor-react-native-text-input-mask
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
How to stop cursor from jumping to the end of input
I start facing the problem when I try to delete/add a digit somewhere in the middle and then cursor immediately moves to the...
Read more >The Curious Case of Cursor Jumping - Mutually Human
It usually happens when the app is programmatically setting/changing the value of the text field in a keydown , keypress , or keyup...
Read more >Cursor jumping/automatically archiving and deleting emails
I use Outlook for personal and work email on my Macbook Air and recently have had major problems when typing emails. The cursor...
Read more >Preserve cursor position when filtering out characters from a ...
If we put the cursor in the middle of the input and try to insert a number, we can see that the cursor...
Read more >Computer Cursor Keeps Jumping Around – What To Do - Alphr
Stop the Cursor Jumping in Windows 10 · Mouse Issue · Update the Mouse Driver · Uninstall the Mouse · Remove Extra Mice...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@abramovslava Ok i see, you’re using version 2. That version is no longer supported, it was created by the previous maintainer, please upgrade to the latest version. I can confirm that it no longer happens on the latest
still jumping on v3.1.4