diff --git a/Components/ChatPlanArea.svelte b/Components/ChatPlanArea.svelte index ab43110..93fcceb 100644 --- a/Components/ChatPlanArea.svelte +++ b/Components/ChatPlanArea.svelte @@ -96,7 +96,8 @@ const stepElement = stepElements[activeStepIndex]; if (!stepElement) return; - const stepTop = stepElement.offsetTop; + // Calculate position relative to the scroll container (wrapperDiv) + const stepTop = stepElement.offsetTop - contentDiv.offsetTop; const stepHeight = stepElement.offsetHeight; const wrapperHeight = wrapperDiv.clientHeight; const scrollTo = stepTop - (wrapperHeight / 2) + (stepHeight / 2); @@ -135,7 +136,7 @@ {/if} {#if index === activeStepIndex}
- +
{/if} {#if index > activeStepIndex} diff --git a/Components/Spinner.svelte b/Components/Spinner.svelte index 89e5b4b..ff0f01d 100644 --- a/Components/Spinner.svelte +++ b/Components/Spinner.svelte @@ -31,6 +31,7 @@ justify-content: center; align-items: center; border-radius: 50%; + flex-shrink: 0; --color: var(--interactive-accent); background: var(--color); background: linear-gradient(