Cursor starts in wrong position in reset forms
See original GitHub issueI’m trying to change the ContactForm sample to have an initial value for a name, “foo”. I’m not sure how to do this correctly, and my attempt leads to a problem rendering text boxes.
My naive try to set the default data was to change the call to super
for ContactView:
super(ContactView, self).__init__(screen,
screen.height * 2 // 3,
screen.width * 2 // 3,
hover_focus=True,
title="Contact Details",
reduce_cpu=True,
data={"name": "foo"})
I don’t think that’s correct, though, given that this constructor is called every time the screen is resized and it seems like this might reset the data to the starting value.
If you actually run this you will see that the cursor appears in the middle of the text box but there is no text.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Cursor Appearing in wrong position. - Microsoft Community
I've tried it myself, and by default, when you click New message, the cursor is on the To: field is left indented unless...
Read more >Wrong Position Cursor after reset Field - bb.donnay-software.com
I made a small program to reproduce the problem. Run the Exe and type 1234. The cursor must always appear aligned to the...
Read more >C# Cursor Position not in right place in forms - Stack Overflow
You're currently getting the Cursor position. Which is relative to the screen, which is why it is a different offset when you move...
Read more >Why is my cursor showing up in the wrong place when I try to ...
Same situation, I have Google Docs on iOS and nothing is working to fix the cursor. For me the cursor will overlap other...
Read more >Cursor jumps to end of controlled input · Issue #955 - GitHub
When an input element is "controlled" by a model, the cursor will jump to the end of the line on every change. This...
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 Free
Top 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
Doh! I meant to check that into master… Sigh.
Thanks, this fixes some other buggy behavior I’ve been encountering, too. I’ve cherry-picked this into master in my own copy.