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

HTML: controlled text input cant edit text in the middle #4346

Open sergeych opened 7 months ago

sergeych commented 7 months ago

Using controlled input, changing corresponding state value recomposes the input control with new input value which always sets the caret to the end of field. It is impossible to input more than 1 character to some caret position - it jumps to the end. This is too bad for the end user

Affected platforms Select one of the platforms below:

Versions

To Reproduce Steps and/or the code snippet to reproduce the behavior:

Create an controlled text input. Try to enter something then set cursor to the middle and try to insert text there.

Expected behavior Controlled TextInput must allow entering more than one character at any caret position without jumping to the end.

okushnikov commented 3 weeks ago

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