-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Material 3 Slider goes out of draggable state prematurely in some cases #4366
Closed
badmannersteam opened this issue
Feb 25, 2024
· 3 comments
· Fixed by JetBrains/compose-multiplatform-core#1135
Closed
Material 3 Slider goes out of draggable state prematurely in some cases #4366
badmannersteam opened this issue
Feb 25, 2024
· 3 comments
· Fixed by JetBrains/compose-multiplatform-core#1135
Labels
Comments
Thanks! Yes this bug appears also on MacOS in Compose for Desktop 1.6.0-rc03. |
igordmn
added a commit
to JetBrains/compose-multiplatform-core
that referenced
this issue
Feb 26, 2024
It is reproducible on Android as well (Jetpack Compose 1.6, Compiler 1.5.8):
|
A temporary workaround until we make a stable release - remember
|
mahozad
added a commit
to mahozad/wavy-slider
that referenced
this issue
Mar 18, 2024
mahozad
added a commit
to mahozad/wavy-slider
that referenced
this issue
Mar 18, 2024
mahozad
added a commit
to mahozad/wavy-slider
that referenced
this issue
Mar 18, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
In some cases (see example below) I have the following slider behavior:
onValueChange
1-3 timesonValueChangeFinished
(when mouse button is still pressed)Affected platforms
Versions
To Reproduce
Run this and try to drag the slider.
Expected behavior
Slider should moves and doesn't go out of draggable state before I release the mouse button.
Additional context
Issue doesn't reproduce in Compose 1.5.12.
Looks like the issue was introduced in this commit - JetBrains/compose-multiplatform-core@f88a09b#diff-407454b5953648c917a33db1d037c1f5f8279ec22e572db656dbd9479f6b129a, maybe because before this commit
gestureEndAction
was remembered inrememberUpdatedState {}
.I don't know exactly what is the problem, but if I inline the class all works fine:
Also remembering of
onValueChangeFinished
value resolves the problem as a workaround:The text was updated successfully, but these errors were encountered: