Smooth-scroll focused release items into view

This commit is contained in:
2026-05-25 16:20:50 +00:00
parent fbf35f7242
commit a3f5ef5dac
@@ -311,6 +311,15 @@ function handleSyncedRowResize() {
} }
function ensureElementVisibleVertically(element: HTMLElement) { function ensureElementVisibleVertically(element: HTMLElement) {
if (element.hasAttribute("data-nav-release-item")) {
element.scrollIntoView({
behavior: "smooth",
block: "nearest",
inline: "nearest",
})
return
}
const rootStyle = window.getComputedStyle(document.documentElement) const rootStyle = window.getComputedStyle(document.documentElement)
const headerHeight = parseFloat(rootStyle.getPropertyValue("--header-height") || "0") const headerHeight = parseFloat(rootStyle.getPropertyValue("--header-height") || "0")
const topMargin = headerHeight + 24 const topMargin = headerHeight + 24