You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Grid throws "window is not defined" during SSR in 22.2.5, 21.2.24 and 22.3.0-beta.1 #17927
Since 22.2.5, 21.2.24 and 22.3.0-beta.1, every grid throws ReferenceError: window is not defined during server-side rendering. IgxForOfDirective._updateScrollOffset() now reads the isRTL getter, which calls window.getComputedStyle() with no platform check. For horizontal igxFor instances, which includes the column virtualization of every grid row and header, this happens in ngOnInit and resolveDataDiff, so it runs on the server. The partially initialized directives then throw TypeError: Cannot read properties of undefined (reading 'removeEventListener') in ngOnDestroy.
Regression from #17783, which was also merged to 22.2.x (#17784) and 21.2.x (#17785) and shipped in 22.2.5 and 21.2.24. 22.3.0-alpha.0 renders the same pages without these errors.
Framework
Angular with SSR (Server-Side Rendering)
Angular Version
22.2.0
Ignite UI for Angular Version
22.2.5, 21.2.24, 22.3.0-beta.1
Component / Area
Grid
Browser
Other
Operating System
macOS
Command Not Working
$ ng build
ERROR ReferenceError: window is not defined
at get isRTL (main.server.mjs)
at IgxGridForOfDirective._updateScrollOffset (main.server.mjs)
at IgxGridForOfDirective.ngOnInit (main.server.mjs)
...
uncaughtException TypeError: Cannot read properties of undefined (reading 'removeEventListener')
at ngOnDestroy (main.server.mjs)
Steps to Reproduce
Create an SSR app with prerendering (ng new repro --ssr) and add igniteui-angular@22.3.0-beta.1.
Render <igx-grid [data]="[{ id: 1 }]" [autoGenerate]="true"></igx-grid> in a prerendered route.
Run ng build, or serve the app and request the route.
Actual Result
Server rendering logs ReferenceError: window is not defined from isRTL for each grid, followed by removeEventListener errors on destroy. The build still exits with code 0, so CI does not catch it.
Expected Result
The grid renders on the server without errors, as in 22.3.0-alpha.0. IgxForOfDirective should not access window outside the browser.
changed the title [-]Grid throws "window is not defined" during SSR in 22.3.0-beta.1[/-][+]Grid throws "window is not defined" during SSR in 22.2.5, 21.2.24 and 22.3.0-beta.1[/+]on Nov 5, 2026
Activity
[-]Grid throws "window is not defined" during SSR in 22.3.0-beta.1[/-][+]Grid throws "window is not defined" during SSR in 22.2.5, 21.2.24 and 22.3.0-beta.1[/+]kdinev commentedon Nov 5, 2026
@simeonoff Just ran into the same issue and notices you've already logged it!
fix(for-of): skip the RTL check outside the browser - 22.2.x (#17929)
fix(for-of): skip the RTL check outside the browser - 21.2.x (#17930)