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 @@ -265,18 +265,24 @@ export class MdSlider implements ControlValueAccessor {
265
265
266
266
/** Increments the slider by the given number of steps (negative number decrements. */
267
267
_increment ( event : KeyboardEvent , numSteps : number ) {
268
+ if ( this . disabled ) { return ; }
269
+
268
270
this . value = this . _clamp ( this . value + this . step * numSteps , this . min , this . max ) ;
269
271
event . preventDefault ( ) ;
270
272
}
271
273
272
274
/** Handles end key pressed. */
273
275
_onEndKeyPressed ( event : KeyboardEvent ) {
276
+ if ( this . disabled ) { return ; }
277
+
274
278
this . value = this . max ;
275
279
event . preventDefault ( ) ;
276
280
}
277
281
278
282
/** Handles home key pressed. */
279
283
_onHomeKeyPressed ( event : KeyboardEvent ) {
284
+ if ( this . disabled ) { return ; }
285
+
280
286
this . value = this . min ;
281
287
event . preventDefault ( ) ;
282
288
}
You can’t perform that action at this time.
0 commit comments