Skip to content

fix(dialog): render asynchronous open state in zoneless apps#17447

Open
viktorkombov wants to merge 2 commits into
masterfrom
vkombov/fix-17443
Open

fix(dialog): render asynchronous open state in zoneless apps#17447
viktorkombov wants to merge 2 commits into
masterfrom
vkombov/fix-17443

Conversation

@viktorkombov

Copy link
Copy Markdown
Contributor

Closes #17443

Description

Fixes the Dialog remaining hidden when its isOpen input is updated
asynchronously in a zoneless application.

Adds regression coverage using a signal-bound isOpen input.

Type of Change (check all that apply):

  • Bug fix
  • New functionality
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (no functional changes)
  • Documentation
  • Demos
  • CI/CD
  • Tests
  • Changelog
  • Skills/Agents

Component(s) / Area(s) Affected:

How Has This Been Tested?

  • Unit tests
  • Manual testing
  • Automated e2e tests

Test Configuration:

  • Angular version:
  • Browser(s):
  • OS:

Screenshots / Recordings

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them
  • Accessibility (ARIA, keyboard navigation, focus management) has been verified

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes a zoneless change-detection edge case where IgxDialogComponent stays visually hidden when isOpen is flipped asynchronously (e.g. via setTimeout + signal-bound input), by explicitly scheduling a check after the deferred open() call.

Changes:

  • Injects ChangeDetectorRef in IgxDialogComponent and calls markForCheck() after the requestAnimationFrame-deferred open() triggered by the isOpen input setter.
  • Adds a zoneless regression test using provideZonelessChangeDetection() and a signal bound to [isOpen] to validate DOM visibility and host hidden class synchronization.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
projects/igniteui-angular/dialog/src/dialog/dialog.component.ts Ensures the dialog host binding/class state is re-rendered after the async open() path in zoneless apps.
projects/igniteui-angular/dialog/src/dialog/dialog.component.spec.ts Adds regression coverage for async signal-driven isOpen updates under zoneless change detection.

Comment on lines +739 to +744
const dialogWindow = document.querySelector<HTMLElement>(DIALOG_WINDOW);
expect(dialog.isOpen).toBeTrue();
expect(dialog.isCollapsed).toBeFalse();
expect(dialogWindow).withContext('dialog window is in the DOM').not.toBeNull();
expect(dialogWindow.getClientRects().length)
.withContext('dialog window is actually rendered').toBeGreaterThan(0);
@mddragnev mddragnev added ✅ status: verified Applies to PRs that have passed manual verification and removed ❌ status: awaiting-test PRs awaiting manual verification labels Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dialog version: 22.1.x ✅ status: verified Applies to PRs that have passed manual verification zoneless

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Zoneless] Setting Dialog isOpen asynchronously does not display the dialog

4 participants