Skip to content

Commit 32f5eab

Browse files
committed
also detach scrolling when Home is pressed
1 parent 3b7a83a commit 32f5eab

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/client/hooks/useChatScroll.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ export const useChatScroll = () => {
1212

1313
const autoScroll = () => {
1414
if (isUserDisabled || transitionPending) {
15-
console.log('skipped', isUserDisabled, transitionPending)
1615
return
1716
}
1817

@@ -71,7 +70,7 @@ export const useChatScroll = () => {
7170

7271
const handleDetachScrollOnKeydown = (ev: KeyboardEvent) => {
7372
// Check that upwards scrolling key is pressed
74-
if (ev.key === 'ArrowUp' || ev.key === 'PageUp') {
73+
if (ev.key === 'ArrowUp' || ev.key === 'PageUp' || ev.key === 'Home') {
7574
detachAutoScroll()
7675
}
7776
}

0 commit comments

Comments
 (0)