Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
fix(checkbox): make enter toggle checkboxes
Browse files Browse the repository at this point in the history
  • Loading branch information
rschmukler committed Mar 26, 2015
1 parent 5fe2e36 commit a9e195f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/checkbox/checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ function MdCheckboxDirective(inputDirective, $mdInkRipple, $mdAria, $mdConstant,
ngModelCtrl.$render = render;

function keypressHandler(ev) {
if(ev.which === $mdConstant.KEY_CODE.SPACE) {
if(ev.which === $mdConstant.KEY_CODE.SPACE || ev.which === $mdConstant.KEY_CODE.ENTER) {
ev.preventDefault();
listener(ev);
}
Expand Down

1 comment on commit a9e195f

@ThomasBurleson
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please sign in to comment.