spectrum-web-components
spectrum-web-components copied to clipboard
[Bug]: <sp-slider> not firing input event(s) after using the handle
Code of conduct
- [X] I agree to follow this project's code of conduct.
Impacted component(s)
slider
Expected behavior
Using the handle from the track or clicking directly on the track (not the handle) and then dragging the handle around should fire input events as long as the user drags the handle around
Actual behavior
After you click on the handle and drag it around the track, if you click on the track somewhere else (not on the handle) the input event doesn't fire
Screenshots
https://github.com/adobe/spectrum-web-components/assets/67201262/81d8afea-608b-4b8d-a655-e9ecda728f98
What browsers are you seeing the problem in?
Firefox, Chrome, Safari
How can we reproduce this issue?
- Go to https://studio.webcomponents.dev/edit/kJJZ9KW0O6c0c4h7Wo4k/src/index.ts?p=stories
- Open console
- Click the handle and drag it around
- See expected behavior - the logs in the console
- Click on the track, not on the handle, and drag it around
- See actual behavior, input event(s) not firing
Sample code that illustrates the problem
No response
Logs taken while reproducing problem
No response
I have also observed same issue. reported this issue in slack channel at https://illustrator-adobe.slack.com/archives/CESK60MQD/p1694759565795379
I see that click after the drag on slider does not generate input event but only generates change event (without input event first). doc link https://opensource.adobe.com/spectrum-web-components/components/slider/
doc says :
Like the element after which the
But this behaviour is inconsistent. For eg, all clicks before the drag, they result in [input, change] event sequence. drag results in [ input, input...., change] and any click after the drag results only in [change] event. event sequence for click is different for clicks that happen before drag and after drag. also this behaviour of getting only [change] event on click is not documented .
Could you please check story book https://studio.webcomponents.dev/edit/DA7Raqtfz5WoyqD7nmIc/src/index.ts?p=stories
fixed via #3190