Skip to content

Commit

Permalink
Make page scroller scroll to top of element
Browse files Browse the repository at this point in the history
We use the page scroller to show the donation form
but this doesn't always align to the top. This modifies
the behavior to make that happen.
  • Loading branch information
Abban committed Oct 25, 2024
1 parent 2a5c8de commit 0bc00a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/PageScroller/WindowPageScroller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { PageScroller } from '@src/utils/PageScroller/PageScroller';
export class WindowPageScroller implements PageScroller {
public scrollIntoView( classSelector: string ): void {
document.querySelector( classSelector )?.scrollIntoView(
{ behavior: 'smooth', block: 'center', inline: 'nearest' }
{ behavior: 'smooth', block: 'start', inline: 'start' }
);
}

Expand Down

0 comments on commit 0bc00a8

Please sign in to comment.