From b7fd68cb9656d8cd63678ebd58fdf75bbc3bea5c Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Sun, 19 Nov 2017 10:45:24 +0100 Subject: [PATCH] fix(checkbox): don't hide focus indicator on space press. 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. --- src/lib/checkbox/checkbox.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/lib/checkbox/checkbox.ts b/src/lib/checkbox/checkbox.ts index 2d4b7db7c66b..76d31dfc83e4 100644 --- a/src/lib/checkbox/checkbox.ts +++ b/src/lib/checkbox/checkbox.ts @@ -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) {