From 0451cc80d0d4149ea1c81ce96deb9b6f0992e04a Mon Sep 17 00:00:00 2001 From: Usama Idriss Kakumba <53287480+usamaidrsk@users.noreply.github.com> Date: Thu, 25 Apr 2024 14:54:00 +0300 Subject: [PATCH] (fix) Improve scroll into view when the form is in validation state (#223) --- src/utils/scroll-into-view.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/scroll-into-view.ts b/src/utils/scroll-into-view.ts index de43ffe1f..68f58ed12 100644 --- a/src/utils/scroll-into-view.ts +++ b/src/utils/scroll-into-view.ts @@ -2,8 +2,8 @@ export function scrollIntoView(viewId: string, shouldFocus: boolean = false) { const currentElement = document.getElementById(viewId); currentElement?.scrollIntoView({ behavior: 'smooth', - block: 'start', - inline: 'start', + block: 'center', + inline: 'center', }); if (shouldFocus) {