File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -739,7 +739,19 @@ export class MatSliderRangeThumb extends MatSliderThumb implements _MatSliderRan
739
739
740
740
const percentage = this . _slider . min < this . _slider . max ? _percentage : 1 ;
741
741
742
- const width = maxWidth * percentage + 24 ;
742
+ // Extend the native input width by the radius of the ripple
743
+ let ripplePadding = this . _slider . _rippleRadius ;
744
+
745
+ // If one of the inputs is maximally sized (the value of both thumbs is
746
+ // equal to the min or max), make that input take up all of the width and
747
+ // make the other unselectable.
748
+ if ( percentage === 1 ) {
749
+ ripplePadding = 48 ;
750
+ } else if ( percentage === 0 ) {
751
+ ripplePadding = 0 ;
752
+ }
753
+
754
+ const width = maxWidth * percentage + ripplePadding ;
743
755
this . _hostElement . style . width = `${ width } px` ;
744
756
this . _hostElement . style . padding = '0px' ;
745
757
You can’t perform that action at this time.
0 commit comments