From 0f4a77292a1eb183e8765d0f4a904be7e189b21a Mon Sep 17 00:00:00 2001 From: jpovixwm <53523617+jpovixwm@users.noreply.github.com> Date: Thu, 21 Mar 2024 16:41:50 +0100 Subject: [PATCH] Prevent scrolling the Name column into view when focusing rows in tables - fixes #179 --- src/components/tables/common.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/tables/common.tsx b/src/components/tables/common.tsx index 1838926..bf7c3d6 100644 --- a/src/components/tables/common.tsx +++ b/src/components/tables/common.tsx @@ -659,7 +659,7 @@ export function EditableNameField(props: EditableNameFieldProps) { if (ref.current != null) { const row = ref.current.parentNode?.parentNode as HTMLDivElement; row.onfocus = () => { - ref.current?.focus(); + ref.current?.focus({ preventScroll: true }); }; return () => { row.onfocus = null; }; }