From 2fb1e6b1004480700c35c8dd7e42f999eb8bb7bc Mon Sep 17 00:00:00 2001 From: Biswa Kalyan Bhuyan Date: Wed, 28 May 2025 20:32:36 +0530 Subject: fix: Applied for React 19 Scroll Handling Error - Added isMounted state to prevent hydration mismatches - Server-side renders a simplified header without Sheet component - Client-side renders full functionality after mounting - Added global error handler to catch and suppress scroll-related errors - Specifically targets "parameter 1 is not of type 'Node'" errors - Prevents error propagation while maintaining functionality - Added proper ref management with sheetRef - Prevented auto-focus events that can trigger scroll issues - Added graceful error handling for escape key and pointer events - Enhanced event handling with try-catch blocks - `onOpenAutoFocus` and `onCloseAutoFocus` prevented to avoid focus issues - `onEscapeKeyDown` and `onPointerDownOutside` with error handling - Cleanup function in useEffect to remove event listeners - Updated `@radix-ui/react-dialog` to latest version - Ensured `react-remove-scroll` is at latest version for React 19 compatibility --- frontend/package.json | 1 + 1 file changed, 1 insertion(+) (limited to 'frontend/package.json') diff --git a/frontend/package.json b/frontend/package.json index d8a00fb..72820a5 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -27,6 +27,7 @@ "next-themes": "^0.4.6", "react": "^19.0.0", "react-dom": "^19.0.0", + "react-remove-scroll": "^2.7.0", "sonner": "^2.0.3", "tailwind-merge": "^3.3.0" }, -- cgit v1.2.3-59-g8ed1b