Skip to content

Commit 24a6b95

Browse files
authored
fix(slider): Focus active handle on pointerdown instead of click (#5037)
fix(slider): Focus active handle on pointerdown instead of click. (#4290)
1 parent 460a39c commit 24a6b95

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/components/slider/slider.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -799,14 +799,10 @@ export class Slider implements LabelableComponent, FormComponent, InteractiveCom
799799
this.setValue(activeProp, this.clamp(fixedDecimalAdjustment, activeProp));
800800
}
801801

802-
@Listen("click")
803-
clickHandler(event: PointerEvent): void {
804-
this.focusActiveHandle(event.clientX);
805-
}
806-
807802
@Listen("pointerdown")
808803
pointerDownHandler(event: PointerEvent): void {
809804
const x = event.clientX || event.pageX;
805+
this.focusActiveHandle(x);
810806
const position = this.translate(x);
811807
let prop: ActiveSliderProperty = "value";
812808
if (isRange(this.value)) {

0 commit comments

Comments
 (0)