From a329241df0bc848d75243b6924d0591296b7172d Mon Sep 17 00:00:00 2001 From: Kenay Perez Date: Fri, 26 Jun 2026 18:33:38 -0700 Subject: [PATCH] fix(command-center): prevent scroll on grid cell focus Calling .focus() without preventScroll caused the page to scroll to the top when clicking a command center grid cell. --- .../features/command-center/components/CommandCenterGrid.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/ui/src/features/command-center/components/CommandCenterGrid.tsx b/packages/ui/src/features/command-center/components/CommandCenterGrid.tsx index 6870f522c9..5ab75a974b 100644 --- a/packages/ui/src/features/command-center/components/CommandCenterGrid.tsx +++ b/packages/ui/src/features/command-center/components/CommandCenterGrid.tsx @@ -80,7 +80,9 @@ function GridCell({ } const selection = window.getSelection(); if (selection && !selection.isCollapsed) return; - cellRef.current?.querySelector("[tabindex='0']")?.focus(); + cellRef.current + ?.querySelector("[tabindex='0']") + ?.focus({ preventScroll: true }); }, [markActive], );