diff --git a/src/material/slider/slider-input.ts b/src/material/slider/slider-input.ts index f357d9dbabc8..898c46ee6f8f 100644 --- a/src/material/slider/slider-input.ts +++ b/src/material/slider/slider-input.ts @@ -637,7 +637,7 @@ export class MatSliderRangeThumb extends MatSliderThumb implements _MatSliderRan } override _onPointerDown(event: PointerEvent): void { - if (this.disabled) { + if (this.disabled || event.button !== 0) { return; } if (this._sibling) { diff --git a/src/material/slider/slider-thumb.ts b/src/material/slider/slider-thumb.ts index 72b902a2fbf6..858465cc5200 100644 --- a/src/material/slider/slider-thumb.ts +++ b/src/material/slider/slider-thumb.ts @@ -172,7 +172,10 @@ export class MatSliderVisualThumb implements _MatSliderVisualThumb, AfterViewIni this._hostElement.classList.remove('mdc-slider__thumb--focused'); }; - private _onDragStart = (): void => { + private _onDragStart = (event: PointerEvent): void => { + if (event.button !== 0) { + return; + } this._isActive = true; this._showActiveRipple(); };