Repository navigation
fix(dialog): mark view for check when open() is called programmatically - #17751
Open
viktorkombov wants to merge 3 commits into
Open
viktorkombov wants to merge 3 commits into
viktorkombov wants to merge 3 commits into
Conversation
The igx-dialog--hidden host class is refreshed by the parent view, so calling open() from an OnPush parent or an async callback left the dialog hidden. IgxToggleDirective.open() only runs detectChanges() on its own view, while the close path already calls markForCheck(). Add markForCheck() to IgxDialogComponent.open() and cover the parent call and async callback cases in both zoneless and ZoneJS mode.
viktorkombov
requested review from
mddragnev
and
a balanced review from Copilot
October 8, 2026 10:11
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new visibility assertions query content after it leaves the dialog host, causing null dereferences.
1 open finding
What changed in this PR
Fixes #17578 by refreshing dialog visibility when open() is called programmatically through an OnPush child or asynchronous callback.
Changes:
- Moves
markForCheck()intoopen(). - Adds regression tests for zoneless and ZoneJS applications.
- Documents the behavior and fix.
| File | Description |
|---|---|
| projects/igniteui-angular/dialog/src/dialog/dialog.component.ts | Marks the view for check when opening. |
| projects/igniteui-angular/dialog/src/dialog/dialog.component.spec.ts | Adds nested OnPush and asynchronous opening tests. |
| projects/igniteui-angular/dialog/README.md | Documents programmatic opening. |
| CHANGELOG.md | Records the visibility fix. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
mddragnev
requested changes
Oct 9, 2026
mddragnev
left a comment
Member
There was a problem hiding this comment.
Two more things:
- There is a conflict in the Changelog
- I don't think that this needs fixing in the
21.2.xbranch. Have you confirmed that it is broken?
Contributor
Author
It is broken in the 21.2.x branch,yes. |
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- Remove the JSDoc from the test components. - Replace the looped describe blocks with explicit ones. - Drop the README section on programmatic opening. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
mddragnev
approved these changes
Oct 9, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

The igx-dialog--hidden host class is refreshed by the parent view, so calling open() from an OnPush parent or an async callback left the dialog hidden. IgxToggleDirective.open() only runs detectChanges() on its own view, while the close path already calls markForCheck().
Add markForCheck() to IgxDialogComponent.open() and cover the parent call and async callback cases in both zoneless and ZoneJS mode.
Closes #17578
Description
Motivation / Context
Type of Change (check all that apply):
Component(s) / Area(s) Affected:
How Has This Been Tested?
Test Configuration:
Screenshots / Recordings
Checklist:
feature/README.MDupdates for the feature docsREADME.MDCHANGELOG.MDupdates for newly added functionalityng updatemigrations for the breaking changes (migrations guidelines)