Steps to reproduce:
- Open the attached project "MinMaxSlider.zip".
- Open the "MyCustomEditor" window (Window > MyCustomEditor).
- Click on an empty space on the right side of the slider (see attached screen recording for reference).
Actual results: Both min and max values are changed, with the max value jumping and following the cursor.
Expected results: The min value stays the same and the max value is changed to the position clicked.
Reproducible with versions:
6000.0.4f1
2022.3.29f1
2021.3.38f1
Tested on (OS): MacOS (M1) 14.4.1
Notes:
- This may be a design issue. But the decision to make the MinMaxSlider follow this behavior leads to a buggy experience, which is exacerbated in the audio random container window (see attached screen recording to understand the issue).
- Originally found when testing the audio random container, which uses the MinMaxSlider for randomization. The custom clamping of min ≤ 0 and max ≥ 0 shows how this behavior can be problematic and degrades the user experience. Also note that this explains the difference between the attached repro project and the screen recording.
- This also applies to game UI using MinMaxSliders.
- The behavior of a similar react web component aligns with the expected results of this ticket.
- More details in this Slack discussion.
Original repro with the audio random container
- Create and open an empty project.
- Create an audio random container asset (Assets > Create > Audio > Audio Random Container).
- Click on the volume randomizer toggle to enable randomization.
- Click on a space on the left side of the volume randomization slider.
- Click on a space on the right side of the volume randomization slider.
- Repeat steps 4-5 several times.
Actual results: Both min and max values are changed.
Expected results: The min value stays the same and the max value is changed to the position clicked.