spectrum-web-components icon indicating copy to clipboard operation
spectrum-web-components copied to clipboard

[Bug]:  <sp-slider> not firing input event(s) after using the handle

Open mizgaionutalexandru opened this issue 1 year ago • 1 comments

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?

  1. Go to https://studio.webcomponents.dev/edit/kJJZ9KW0O6c0c4h7Wo4k/src/index.ts?p=stories
  2. Open console
  3. Click the handle and drag it around
  4. See expected behavior - the logs in the console
  5. Click on the track, not on the handle, and drag it around
  6. See actual behavior, input event(s) not firing

Sample code that illustrates the problem

No response

Logs taken while reproducing problem

No response

mizgaionutalexandru avatar Jul 17 '23 13:07 mizgaionutalexandru

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 is fashioned, it will dispatch input events in a stream culminating with a change event (representing the final commit of the value to the element) once the user has finished interacting with the element.

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

cdprashanth avatar Sep 21 '23 06:09 cdprashanth

fixed via #3190

najikahalsema avatar Aug 07 '24 16:08 najikahalsema