Skip to content

bug(Overlay): overlayOutsideClick triggered when clicking into shadowDOM within overlay #29241

Closed
@ChristophWieske

Description

@ChristophWieske

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

When using a shadowDOM (e.g. with custom web components) within an overlay a click to that shadowDOM will trigger overlayOutsideClick.

Can you confirm that this is unintended behavior?
If yes, I´ll try to provide a pull request to fix it.

Reproduction

StackBlitz link: https://stackblitz.com/edit/cdk-overlay-web-components-issue?file=src%2Fmain.ts

Steps to reproduce:

  1. Open the overlay by clicking the "open" button
  2. Click the web component button

Expected Behavior

The click does not trigger overlayOutsideClick

Actual Behavior

The click does trigger overlayOutsideClick

Environment

  • Angular: 18.0.0
  • CDK: 18.0.2

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