Skip to content

Commit 207bf54

Browse files
committed
scroll to bottom with inline and block nearest
1 parent 61e9231 commit 207bf54

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/scroll-to-bottom.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export const scrollToBottom = (targetClass = 'bottom') => {
22
document.getElementsByClassName(targetClass)[0].scrollIntoView({
33
behavior: 'smooth',
4-
block: 'end',
5-
inline: 'end'
4+
block: 'nearest',
5+
inline: 'nearest'
66
})
77
}

0 commit comments

Comments
 (0)