Cursor in TextInput jumps when using in Modal/Dialog
See original GitHub issueCurrent behaviour
I’m using a TextInput
inside a Dialog
. When entering text somewhere in the middle, the cursor jumps back before that newly entered character. When deleting a character, the cursor jumps before the previous character.
Expected behaviour
Code sample
const [value, setValue] = useState("");
return (
<Portal>
<Dialog visible={props.visible} dismissable={false}>
<Dialog.Title>Title</Dialog.Title>
<Dialog.Content>
<TextInput value={value} onChangeText={setValue} />
</Dialog.Content>
</Dialog>
</Portal>
);
Screenshots (if applicable)
What have you tried
Your Environment
software | version |
---|---|
ios or android | android |
react-native | 0.63.4 |
react-native-paper | 4.7.2 |
node | 14.15.4 |
npm | 7.5.4 |
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Developers - Cursor in TextInput jumps when using in Modal/Dialog -
I'm using a TextInput inside a Dialog . When entering text somewhere in the middle, the cursor jumps back before that newly entered...
Read more >TextInput cursor jump to right end when the input is empty
So this method will prevent you from getting cursor jumping to the right. There is another props called caretHidden. You can use them...
Read more >Modal Dialog Example | APG | WAI - W3C
The text of this dialog describes design considerations for initial focus and accessible descriptions in dialogs with large amounts of text.
Read more >Modal - Bootstrap
Use Bootstrap's JavaScript modal plugin to add dialogs to your site for lightboxes, user notifications, or completely custom content.
Read more >Modal dialog - Examples - Components - Atlassian Design ...
A modal dialog displays content that requires user interaction, ... jump between projects, and get back to work quickly with our new look...
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
Pass the state value to the defaultValue prop it will make the input uncontrolled and the issue will get solved
I still have this problem, and it’s annoying !