fix(app): keyboard navigation previous/next message (#15047)

This commit is contained in:
Filip
2026-02-25 15:57:13 +01:00
committed by GitHub
parent 2869922696
commit 45191ad144
3 changed files with 10 additions and 6 deletions

View File

@@ -45,7 +45,9 @@ export const useSessionHashScroll = (input: {
const a = el.getBoundingClientRect()
const b = root.getBoundingClientRect()
const top = a.top - b.top + root.scrollTop
const sticky = root.querySelector("[data-session-title]")
const inset = sticky instanceof HTMLElement ? sticky.offsetHeight : 0
const top = Math.max(0, a.top - b.top + root.scrollTop - inset)
root.scrollTo({ top, behavior })
return true
}