Skip to content

fix(shadow-root): sync overlay styles - #2448

Open
chintankavathia wants to merge 1 commit into
mainfrom
fix/shadow-root-late-styles
Open

fix(shadow-root): sync overlay styles#2448
chintankavathia wants to merge 1 commit into
mainfrom
fix/shadow-root-late-styles

Conversation

@chintankavathia

@chintankavathia chintankavathia commented Jul 30, 2026

Copy link
Copy Markdown
Member

Keep the detached overlay shadow root synchronized with styles registered after its container is created.

Fixes #2447


Documentation.
Examples.
Dashboards Demo.
Playwright report.

Coverage Reports:

Code Coverage

@chintankavathia
chintankavathia marked this pull request as ready for review July 30, 2026 06:28
@chintankavathia
chintankavathia requested review from a team as code owners July 30, 2026 06:28

@spike-rabbit spike-rabbit left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment thread projects/element-ng/shadow-root/si-shadow-root.directive.ts Outdated

@spike-rabbit spike-rabbit left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was supposed to be Request Changes in the first place 😆

Keep the detached overlay shadow root synchronized with styles registered after its container is created.

Fixes #2447
@chintankavathia
chintankavathia force-pushed the fix/shadow-root-late-styles branch from d1e9ab2 to cd2345a Compare July 31, 2026 07:00

it('should copy styles registered after the overlay container was created', async () => {
fixture.componentInstance.open.set(true);
fixture.detectChanges();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
fixture.detectChanges();
await fixture.whenStable();

ideally there is no detectChanges

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shadow root overlays miss styles from lazily rendered child components

2 participants