diff --git a/packages/x-data-grid/src/hooks/features/dimensions/useGridDimensions.ts b/packages/x-data-grid/src/hooks/features/dimensions/useGridDimensions.ts index dae588d1d1bd..c29918e30bbf 100644 --- a/packages/x-data-grid/src/hooks/features/dimensions/useGridDimensions.ts +++ b/packages/x-data-grid/src/hooks/features/dimensions/useGridDimensions.ts @@ -329,7 +329,7 @@ export function useGridDimensions( rootDimensionsRef.current = size; // jsdom has no layout capabilities - const isJSDOM = /jsdom/.test(window.navigator.userAgent); + const isJSDOM = /jsdom|HappyDOM/.test(window.navigator.userAgent); if (size.height === 0 && !errorShown.current && !props.autoHeight && !isJSDOM) { logger.error( diff --git a/packages/x-data-grid/src/hooks/features/virtualization/useGridVirtualScroller.tsx b/packages/x-data-grid/src/hooks/features/virtualization/useGridVirtualScroller.tsx index 679b05f8bbbb..499c21a66c40 100644 --- a/packages/x-data-grid/src/hooks/features/virtualization/useGridVirtualScroller.tsx +++ b/packages/x-data-grid/src/hooks/features/virtualization/useGridVirtualScroller.tsx @@ -92,7 +92,7 @@ type ScrollCache = ReturnType; let isJSDOM = false; try { if (typeof window !== 'undefined') { - isJSDOM = /jsdom/.test(window.navigator.userAgent); + isJSDOM = /jsdom|HappyDOM/.test(window.navigator.userAgent); } } catch (_) { /* ignore */