Skip to content

Commit

Permalink
fix(slider): ensure "sp-slider:input" is dispatched appropriately
Browse files Browse the repository at this point in the history
  • Loading branch information
Westbrook committed Oct 23, 2019
1 parent 85ad2ea commit ded5440
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/slider/src/slider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ export class Slider extends Focusable {
protected updated(changedProperties: PropertyValues): void {
if (changedProperties.has('value')) {
this.value = this.clampValue(this.value);
this.dispatchInputEvent();
}
}

Expand Down Expand Up @@ -311,7 +312,6 @@ export class Slider extends Focusable {
return;
}
this.value = this.calculateHandlePosition(this.currentMouseEvent);
this.dispatchInputEvent();
requestAnimationFrame(() => this._trackMouseEvent());
}

Expand Down Expand Up @@ -346,7 +346,6 @@ export class Slider extends Focusable {

private onMouseMove = (ev: MouseEvent): void => {
this.currentMouseEvent = ev;
this.dispatchInputEvent();
};

private onPointerCancel(ev: PointerEvent): void {
Expand All @@ -366,7 +365,6 @@ export class Slider extends Focusable {
this.handle.setPointerCapture(ev.pointerId);

this.value = this.calculateHandlePosition(ev);
this.dispatchInputEvent();
}

private onTrackMouseDown(ev: MouseEvent): void {
Expand All @@ -391,7 +389,6 @@ export class Slider extends Focusable {
this.value = this.clampValue(inputValue);
this.input.value = this.value.toString();

this.dispatchInputEvent();
this.dispatchChangeEvent();
}

Expand Down

0 comments on commit ded5440

Please sign in to comment.