Skip to content

bug(CDK-Overlay): positionChange event runs outside of ngZone #28568

Closed
@dobripet

Description

@dobripet

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

I am facing issue that I need to manually trigger change detection when handling overlay output event positionChange.

I would expect that angular library components / directive output events will be in zone so consumer does not need to run manual detection change when handling.

Reproduction

StackBlitz link: https://stackblitz.com/edit/crrhb9?file=package.json
Steps to reproduce:

  1. click open
  2. read trough items and click outside e.g.
  3. click close
  4. click open detectchanges
  5. read trough

Expected Behavior

positionChange event is emitted in ngZone

Actual Behavior

positionChange event is emitted outside of ngZone

Environment

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

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions