compose-multiplatform icon indicating copy to clipboard operation
compose-multiplatform copied to clipboard

TextField crashing on kotlin compose desktop

Open marcelo-juncken opened this issue 2 years ago • 4 comments

Describe the bug app is crashing with a simple textfield in an empty composable app when selecting text, typing again and dragging

Affected platforms Desktop

Versions 1.8.0- Kotlin version*: 1.3.0- Compose Multiplatform version*: windows 10 home - OS version(s): x64- OS architecture : 18.0.2.1 - JDK:

To Reproduce

  1. Create a simple TextField
  2. run the app
  3. type anything that has more than 2 letters (I couldnt replicate with one letter, but I did with two).
  4. select some part of the text (You have to select 2 or more letters, and prefer select going from the end to the left, otherwise its harder to replicate) without releasing the mouse button
  5. type anything
  6. move mouse button to anywhere
  7. release mouse button error

Expected behavior Nothing

Additional Information Bug doesn't happen on versions: kotlin.version=1.6.10 compose.version=1.1.1

marcelo-juncken avatar Mar 17 '23 01:03 marcelo-juncken

Reproduced on MacOs too: https://github.com/eymar/repr_compose_2891

Compose: 1.3.1 Kotlin: 1.8.10

I confirm that it works in compose 1.1.1

eymar avatar Mar 20 '23 16:03 eymar

@starglad Thanks! The issue is clear and reproducible.

What behaviour did you want to achieve my typing while keeping the mouse button pressed after selection + moving the mouse afterwards?

Did you expected anything useful from that sequence of actions? I'm trying to understand if there is some sort of UX pattern (common action) implemented with the steps you described.

eymar avatar Mar 20 '23 16:03 eymar

I didnt expect anything at all actually..I did this by accident when trying to test masks on textfield. First I thought it was an issue with my mask, but then I saw it happened in a clean project.

marcelo-juncken avatar Mar 20 '23 18:03 marcelo-juncken

@starglad Thanks! The issue is clear and reproducible.

What behaviour did you want to achieve my typing while keeping the mouse button pressed after selection + moving the mouse afterwards?

Did you expected anything useful from that sequence of actions? I'm trying to understand if there is some sort of UX pattern (common action) implemented with the steps you described.

I forgot to mention, but for some reason(may be related to the same issue) when typing fast, sometimes the last letters mixes up. Like if I type "asdf" it comes "adsf". It happens on the same version as the issue above (1.8.0 kotlin and 1.3.0 compose). Additionally it also DOESN'T happen at kotlin 1.6.10 and compose 1.1.1

marcelo-juncken avatar Mar 29 '23 19:03 marcelo-juncken