-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cursor skipping back while start typing a value in numeric field #1914
Comments
I can replicate this! Interesting bug for sure. Ill look into this some more |
Found the issue. When we go to update the UI, we do a text comparison of the answer saved in the ViewModel vs what is on the screen. If they are different, we update the UI with the text from the ViewModel. When a user types in "01", that is saved as "1" in the ViewModel, so when UI does the comparison, it sees these as different and updates the UI with 1. This happens here": To fix that, we can do an int comparison instead:
I tried this and it worked. I need to add test cases, and once I do, Ill push a PR out |
This issue seems to be reoccurring again cc @omarismail94 |
@f-odhiambo please assign this to someone thanks! |
@MJ1998 please find here a screen recording of the cursor skipping bug on emulator, along with the emulator bug report.
Let me know if you require any further information or clarification? |
@MJ1998 Screen recording of the bug on the SID Bunda app. Screen_recording_20240503_125603.webm |
Thanks. Looking into this |
The way I was able to consistently replicate the issue was by doing some intensive work on the main thread. I simply created an infinite loop in the
|
Describe the bug
Cursor is skipping back while start typing on the numeric field if the initial value is set to 0
Component
SDC library
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Cursor should stick to the end position of the field.
Screenshots
device-2023-03-16-144134.mp4
Smartphone (please complete the following information):
The text was updated successfully, but these errors were encountered: