https://kotlinlang.org logo
#compose
Title
# compose
z

Zoltan Demant

12/08/2021, 6:53 AM
Has anyone had any reports of missing/ignored keystrokes when typing fast in compose? I received a bug report with video-proof this morning and I swear I saw a post about it on here earlier - but I cant find it now!
c

Colton Idle

12/08/2021, 9:54 AM
There were a few bugs filed for this I think. I feel like Zach K pointed me in the right direction. For me, I get a lot of users pointing out that my password text field doesn't allow the user to backspace too fast. lmao
z

Zoltan Demant

12/08/2021, 10:07 AM
What was the right direction? 😄 The bug report I received was basically someone entering numbers fast, and some of them missing from the actual input field!
This only seems to happen when using gboard mind blown Any clues?
f

Francesc

12/08/2021, 9:18 PM
check how you update your field, if you do any sort of lengthy validation from the input that could be causing it
👍🏽 1
z

Zach Klippenstein (he/him) [MOD]

12/09/2021, 4:52 PM
This can happen if the text events are handled on a background thread, or otherwise after the frame
z

Zoltan Demant

12/10/2021, 5:44 AM
It all happens on the main thread, at the root I just use
rememberCoroutineScope()
since adopting compose. I saw something in the workflow library a while back (TextController?) but I fail to see how that would be useful in compose as well? In the regular view system I can clearly see it, but with compose the users input would result in an updated state, which triggers a new rendering, which is then seen in the UI. Its the only way for the text to actually update, and since it all happens on the main thread, how can events be skipped?
3 Views