From ded544078d56d4358e6767e2a68d5151787695da Mon Sep 17 00:00:00 2001 From: Westbrook Johnson Date: Tue, 22 Oct 2019 22:21:23 -0400 Subject: [PATCH] fix(slider): ensure "sp-slider:input" is dispatched appropriately --- packages/slider/src/slider.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/slider/src/slider.ts b/packages/slider/src/slider.ts index 3c3113f55b..1a2b317080 100644 --- a/packages/slider/src/slider.ts +++ b/packages/slider/src/slider.ts @@ -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(); } } @@ -311,7 +312,6 @@ export class Slider extends Focusable { return; } this.value = this.calculateHandlePosition(this.currentMouseEvent); - this.dispatchInputEvent(); requestAnimationFrame(() => this._trackMouseEvent()); } @@ -346,7 +346,6 @@ export class Slider extends Focusable { private onMouseMove = (ev: MouseEvent): void => { this.currentMouseEvent = ev; - this.dispatchInputEvent(); }; private onPointerCancel(ev: PointerEvent): void { @@ -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 { @@ -391,7 +389,6 @@ export class Slider extends Focusable { this.value = this.clampValue(inputValue); this.input.value = this.value.toString(); - this.dispatchInputEvent(); this.dispatchChangeEvent(); }