Skip to content

Commit 9e35bf0

Browse files
devversiontinayuangao
authored andcommitted
fix(checkbox): don't hide focus indicator on space press. (#8539)
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.
1 parent 75c665a commit 9e35bf0

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/lib/checkbox/checkbox.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,6 @@ export class MatCheckbox extends _MatCheckboxMixinBase implements ControlValueAc
365365
// Preventing bubbling for the second event will solve that issue.
366366
event.stopPropagation();
367367

368-
this._removeFocusRipple();
369-
370368
if (!this.disabled) {
371369
// When user manually click on the checkbox, `indeterminate` is set to false.
372370
if (this._indeterminate) {

0 commit comments

Comments
 (0)