Skip to content

Commit

Permalink
(fix) Improve scroll into view when the form is in validation state (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
usamaidrsk authored Apr 25, 2024
1 parent 348be86 commit 0451cc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/scroll-into-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 0451cc8

Please sign in to comment.