Skip to content

Commit

Permalink
fix(slider): Focus active handle on pointerdown instead of click. (#4290
Browse files Browse the repository at this point in the history
)
  • Loading branch information
driskull committed Jul 27, 2022
1 parent 568bb36 commit c4a0f57
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/components/slider/slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -799,14 +799,10 @@ export class Slider implements LabelableComponent, FormComponent, InteractiveCom
this.setValue(activeProp, this.clamp(fixedDecimalAdjustment, activeProp));
}

@Listen("click")
clickHandler(event: PointerEvent): void {
this.focusActiveHandle(event.clientX);
}

@Listen("pointerdown")
pointerDownHandler(event: PointerEvent): void {
const x = event.clientX || event.pageX;
this.focusActiveHandle(x);
const position = this.translate(x);
let prop: ActiveSliderProperty = "value";
if (isRange(this.value)) {
Expand Down

0 comments on commit c4a0f57

Please sign in to comment.