Skip to content

bug(MatAutocompleteTrigger): callback applied to closed EventEmitter runs outside of the Angular Zone on outside click #24811

Closed
@br-kwon

Description

@br-kwon

Is this a regression?

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

The previous version in which this bug was not present was

No response

Description

The callback applied to the closed EventEmitter seems to run outside of the Angular Zone when closed is emitted via "outside click"

Reproduction

https://stackblitz.com/edit/components-issue-83t6vu?file=src/app/autocomplete.component.ts

Steps to reproduce:

  1. click inside input - should open panel and disable button
  2. click outside panel to close it - expect button to be enabled, but remains disabled

Expected Behavior

clicking outside the panel to close the panel should have disabled the button without using ngZone.run()

Actual Behavior

the button remains disabled

Environment

  • Angular: 13.3.0
  • CDK/Material: 13.3.0
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): macOS

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/autocomplete

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions