Skip to content

menu: trigger ExpressionChangedAfterItHasBeenCheckedError aria-expanded: null in OnPush component #14440

@StefanoLucchi

Description

@StefanoLucchi

What is the expected behavior?

Error should not occur

What is the current behavior?

Repeatedly and quickly clicking on menu trigger button causes error

What are the steps to reproduce?

StackBlitz
Click on menuTrigger repeatedly -> error shows in console

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

Angular 7.1.0
Angular Material 7.1.0
Chrome Browser

Is there anything else we should know?

ChangeDetection: OnPush

ERROR
Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'aria-expanded: true'. Current value: 'aria-expanded: null'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/menu

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions