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
16.24k stars 1.18k forks source link

Double Click interaction broken on Touchpad #4119

Closed Selemba1000 closed 1 month ago

Selemba1000 commented 10 months ago

Describe the bug All Modifiers to react to a double click dont work with a touchpad. This includes combinedClickable and onClick. It seems the set period for the second click is not long enough for touchpad interaction, or something else is wrong. Same modifiers work with mouse input.

Affected platforms

Versions

To Reproduce Just add combinedClickable modifier to a visible objekt and set the onDoubleClick handler.

Expected behavior The handler should be executed when double tapping the touchpad. But only gets run if mouse is used.

Selemba1000 commented 10 months ago

Experimentaly i found that around 200ms double clicks can be picked up. 150ms semms to small. Seems like there is a limit to how fast touchpad taps can be recognised after another.

Akhil-Hothi commented 5 months ago

Initially I also thought that click timing is problem but now I think it's not the problem with duration.

It's that you need to tap thrice instead of twice. In my case, when I tap thrice it works fine. Try that and let me know if that is the same case for you.

okushnikov commented 3 months ago

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