components icon indicating copy to clipboard operation
components copied to clipboard

bug(Button): cdk-focus classes not being applied

Open kevinjihwanlee opened this issue 3 years ago • 0 comments
trafficstars

Is this a regression?

  • [X] Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

14.2.1

Description

Buttons do not have .cdk-focused, .cdk-keyboard-focused, nor .cdk-mouse-focused classes applied upon focus, as seen in the demo. Considering that previous button behavior apply those classes upon focus, this does not seem to be intended behavior.

Reproduction

Steps to reproduce:

  1. Focus button with mouse or keyboard
  2. Examine button element in DevTools

Expected Behavior

Upon focusing button with mouse, it should have both .cdk-focused and .cdk-mouse-focused classes applied to it. Upon focusing button with keyboard, it should have both .cdk-focused and .cdk-keyboard-focused classes applied to it.

Actual Behavior

Upon focusing button with mouse and keyboard, no .cdk-focused-* classes were applied.

Environment

  • Angular: 15.0.0-next.0
  • CDK/Material: 15.0.0-next.0
  • Browser(s): Google Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): macOS

kevinjihwanlee avatar Sep 10 '22 00:09 kevinjihwanlee