-
Notifications
You must be signed in to change notification settings - Fork 4
fix(navbar,autocomplete): use afterNextRender for event listeners for ssr support (#DS-3964) #1129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances SSR (Server-Side Rendering) support by wrapping browser-specific event listener registrations in afterNextRender() to ensure they only execute in browser environments, preventing SSR runtime errors.
- Uses Angular's
afterNextRender()to defer event listener setup until client-side rendering - Removes conditional logic that checked for
windowavailability before adding event listeners - Maintains
ngZone.runOutsideAngular()for performance optimization
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/components/navbar/navbar-item.component.ts | Wraps keyboard event listener registration in afterNextRender() for SSR compatibility |
| packages/components/autocomplete/autocomplete-trigger.directive.ts | Wraps blur event listener registration in afterNextRender() for SSR compatibility |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Visit the preview URL for this PR (updated for commit 314f550): https://koobiq-next--prs-1129-e2h63600.web.app (expires Tue, 25 Nov 2025 07:46:35 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: c9e37e518febda70d0317d07e8ceb35ac43c534c |
… ssr support (#DS-3964)
7139564 to
34a1347
Compare
|
DS-3964 - закрыта в прошлом спринте |
No description provided.