fix(comments): remount AnnotationCommentPanel when switching annotations
Some checks failed
CI / Unit & Component Tests (push) Failing after 2m13s
CI / Backend Unit Tests (push) Successful in 2m23s
CI / E2E Tests (push) Failing after 24m41s
CI / Unit & Component Tests (pull_request) Failing after 2m8s
CI / Backend Unit Tests (pull_request) Successful in 2m8s
CI / E2E Tests (pull_request) Has been cancelled

Wrap the panel in {#key activeAnnotationId} so Svelte destroys and
recreates it on every annotation change, triggering onMount and
loading the correct comments.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-03-24 11:28:44 +01:00
parent af57b4e530
commit fd03e56c85

View File

@@ -452,6 +452,7 @@ function zoomOut() {
{/if} {/if}
</div> </div>
{#key activeAnnotationId}
{#if activeAnnotationId} {#if activeAnnotationId}
<AnnotationCommentPanel <AnnotationCommentPanel
documentId={documentId} documentId={documentId}
@@ -465,5 +466,6 @@ function zoomOut() {
}} }}
/> />
{/if} {/if}
{/key}
</div> </div>
{/if} {/if}