From a8fea8d9004611d67059ea5e1a28239aa5dbf0a2 Mon Sep 17 00:00:00 2001 From: Florian Sylvain Date: Sun, 25 Oct 2026 20:26:52 +0100 Subject: [PATCH] fix: changed "Jump to" so it scrolls only the page's own scroll container --- web/src/views/IntegrationView.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/web/src/views/IntegrationView.vue b/web/src/views/IntegrationView.vue index b93b232..6c757c1 100644 --- a/web/src/views/IntegrationView.vue +++ b/web/src/views/IntegrationView.vue @@ -126,7 +126,15 @@ function sectionElement(id: string) { function goTo(id: string) { activeSection.value = id - sectionElement(id)?.scrollIntoView?.({ block: 'start' }) + const element = sectionElement(id) + const parent = element ? scrollParent(element) : null + if (!element || !parent) { + element?.scrollIntoView?.({ block: 'start' }) + return + } + const margin = parseFloat(getComputedStyle(element).scrollMarginTop) || 0 + const offset = element.getBoundingClientRect().top - parent.getBoundingClientRect().top + parent.scrollTo({ top: parent.scrollTop + offset - margin }) } function updateActive() {