Skip to content
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

Cannot click to select min or max value when using slider with step property #4577

Closed
smahl opened this issue Oct 9, 2023 · 1 comment
Closed
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@smahl
Copy link

smahl commented Oct 9, 2023

Describe the bug

Hi,
On the website, https://primevue.org/slider/, there is an example of using the step property with a slider. However it is impossible to select the smallest or largest value by clicking, if you click at the start the second smallest value is selected, if you click at the end of the slider the second largest value is selected. (The smallest value can be selected, but the hitarea is very small and you end up missing it most of the time).
You can click and drag to select both smallest and largest value.

After clicking, you can clearly see in the slider that your desired value has not been selected.

image

I can confirm I also see this bug when running my own application. Seems this is always an issue, but the effect is much more pronunced when using min,max,steps property with low values.

I could not get the sandbox to work at all.

Reproducer

https://codesandbox.io/s/charming-benz-rz28jm?file=/src/App.vue

PrimeVue version

3.35.0

Vue version

3.x

Language

TypeScript

Build / Runtime

Vue CLI App

Browser(s)

At least Chrome and Safari

Steps to reproduce the behavior

  1. Go to the section called "Steps" at https://primevue.org/slider/
  2. Click at the end of the slider, see the second largest value selected

Expected behavior

I would expected the largest value to be selected when I click at the end of the slider. Same for smallest value.

@smahl smahl added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Oct 9, 2023
@tugcekucukoglu tugcekucukoglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Oct 10, 2023
@tugcekucukoglu tugcekucukoglu added this to the 3.35.1 milestone Oct 10, 2023
@tugcekucukoglu tugcekucukoglu self-assigned this Oct 10, 2023
@smahl
Copy link
Author

smahl commented Oct 17, 2023

Hi,
I am glad you tried to solve this in 3.36.0, which you sort of did.
The click behavior works as expected, but now everything is very jittery when you drag the slider, for example see https://primevue.org/slider/#step

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

2 participants