material-components-web icon indicating copy to clipboard operation
material-components-web copied to clipboard

[mdc-checkbox] focus state not showing inside mdc-dialog

Open kvdheuvel opened this issue 7 years ago • 2 comments

Bug report

mdc-checkbox focus state not showing while tabbing through all components when it is inside an mdc-dialog.

Focus state does show when the checkbox is checked.

Steps to reproduce

  1. Go to '(https://codepen.io/kvdheuvel/pen/mNqzdX)'
  2. Use tab to set the focus on the checkbox.
  3. Focus not showing.

Actual behavior

When an mdc-checkbox is used inside an mdc-dialog the focus state does not show while using tab to highlight the elements.

Expected behavior

To see an focus state

Your Environment:

Software Version(s)
MDC Web 3.1.0
Browser all
Operating System Windows 10

kvdheuvel avatar Aug 05 '19 11:08 kvdheuvel

@joyzhong can you take a look and see if it's a dialog issue?

bonniezhou avatar Aug 08 '19 21:08 bonniezhou

I was able to fix this by initializing Checkbox once the dialog is opened.

Please see this example on codepen.

abhiomkar avatar Sep 05 '19 18:09 abhiomkar