Skip to content

Commit

Permalink
fix(checkbox): don't hide focus indicator on space press. (angular#8539)
Browse files Browse the repository at this point in the history
No longer hides the focus indicator ripple on click/space. Right now if a keyboard user tabs to the checkbox and presses SPACE to toggle the checkbox, the focus indicator ripple disappears. This makes it hard to see what element is focused or not.

For comparison, native checkboxes also keep the focus effect on keyboard press. Also Polymer follows the same convention with the focus indicator.
  • Loading branch information
devversion authored and tinayuangao committed Nov 29, 2017
1 parent 57b9805 commit 343f930
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/lib/checkbox/checkbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,6 @@ export class MatCheckbox extends _MatCheckboxMixinBase implements ControlValueAc
// Preventing bubbling for the second event will solve that issue.
event.stopPropagation();

this._removeFocusRipple();

if (!this.disabled) {
// When user manually click on the checkbox, `indeterminate` is set to false.
if (this._indeterminate) {
Expand Down

0 comments on commit 343f930

Please sign in to comment.