Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
fix(slider): disabled sliders still usable w/ keys
Browse files Browse the repository at this point in the history
  • Loading branch information
raymond-h authored and ajoslin committed Oct 16, 2014
1 parent 1f5ce09 commit f78f1b3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/slider/slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@ function SliderController(scope, element, attr, $$rAF, $window, $mdEffects, $mdA
* left/right arrow listener
*/
function keydownListener(ev) {
if(element[0].hasAttribute('disabled')) {
return;
}

var changeAmount;
if (ev.which === $mdConstant.KEY_CODE.LEFT_ARROW) {
changeAmount = -step;
Expand Down

0 comments on commit f78f1b3

Please sign in to comment.