Skip to content

Checkbox looses focus on click #13002

Open
@palpatine1991

Description

@palpatine1991

Bug, feature request, or proposal:

Bug

What is the expected behavior?

mat-checkbox should not trigger focusout event when user clicks on it

What is the current behavior?

if mat-checkbox already has focus and user clicks on it, it triggers focusout event.

What are the steps to reproduce?

https://stackblitz.com/edit/angular-pdnvun?file=app%2Fcheckbox-overview-example.html

just click two times on checkbox and check the console. You will see:

Focused in...
Focused Out...
Focused in...

What is the use-case or motivation for changing an existing behavior?

When you need to react on focusout, it causes big issues

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Tested on Angular 6.0.7, Material 6.3.2

Is there anything else we should know?

Same thing happens for Radio Buttons and also for MatSelect when you clicking on any option

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4A relatively minor issue that is not relevant to core functionsarea: material/checkbox

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions