File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -266,18 +266,24 @@ export class MdSlider implements ControlValueAccessor {
266
266
267
267
/** Increments the slider by the given number of steps (negative number decrements. */
268
268
_increment ( event : KeyboardEvent , numSteps : number ) {
269
+ if ( this . disabled ) { return ; }
270
+
269
271
this . value = this . _clamp ( this . value + this . step * numSteps , this . min , this . max ) ;
270
272
event . preventDefault ( ) ;
271
273
}
272
274
273
275
/** Handles end key pressed. */
274
276
_onEndKeyPressed ( event : KeyboardEvent ) {
277
+ if ( this . disabled ) { return ; }
278
+
275
279
this . value = this . max ;
276
280
event . preventDefault ( ) ;
277
281
}
278
282
279
283
/** Handles home key pressed. */
280
284
_onHomeKeyPressed ( event : KeyboardEvent ) {
285
+ if ( this . disabled ) { return ; }
286
+
281
287
this . value = this . min ;
282
288
event . preventDefault ( ) ;
283
289
}
You can’t perform that action at this time.
0 commit comments