JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
15.95k stars 1.16k forks source link

Text input Lose Keystrokes #888

Open jimgoog opened 3 years ago

jimgoog commented 3 years ago

I happened to be playing with the Todo List app, and noticed that if I type quickly, it loses keystrokes.

In particular, see the attached video, watch in slow motion for better visibility. The only keys I hit were numerical and the key. I tried to hit the numbers with an enter between each one, although it's conceivable my fat fingers misordered. Either way, regardless of the order I actually achieved, the symptoms we see do not match any possible keyboard input.

https://user-images.githubusercontent.com/29311816/125706690-b5e2cc4d-125d-4c41-bafb-ad16158db173.mov

The "1" and "2" appear on the same line in the text input (presumably with an enter in. between, which didn't render for some unknown reason). Then the 1 appears as a todo item and the 2 vanishes entirely. The 3, 4, 5, and 6 all appear in the text box, and the keys are received, but they become entered as empty items. Then the 7 and 8 both appear in the textbox, separated by a newline, and then the 7 goes into the app and the 8 follows.

I don't care about the TODO app in particular, but if we're losing keystrokes here, there is some sort of race condition that is likely to get worse as apps grow and various latencies increase.

igordmn commented 10 months ago

Maybe related: https://github.com/JetBrains/compose-multiplatform/issues/3952 https://github.com/JetBrains/compose-multiplatform/issues/3288

okushnikov commented 2 months ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.