Skip to content

Commit b7dc6c6

Browse files
authored
fix(material/slider): fix slider resize w/ transforms (#26044)
* Fixes Issue #26043
1 parent c8b6730 commit b7dc6c6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/material/slider/slider.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -573,9 +573,8 @@ export class MatSlider
573573

574574
/** Stores the slider dimensions. */
575575
_updateDimensions(): void {
576-
const rect = this._elementRef.nativeElement.getBoundingClientRect();
577-
this._cachedWidth = rect.width;
578-
this._cachedLeft = rect.left;
576+
this._cachedWidth = this._elementRef.nativeElement.offsetWidth;
577+
this._cachedLeft = this._elementRef.nativeElement.getBoundingClientRect().left;
579578
}
580579

581580
/** Sets the styles for the active portion of the track. */

0 commit comments

Comments
 (0)