From 42a5b97e0e869eae3501be5bfd3e37e8d5d07380 Mon Sep 17 00:00:00 2001 From: Jared Pereira Date: Thu, 25 Dec 2025 14:30:28 +0400 Subject: [PATCH] use document uris for post page ids --- app/lish/[did]/[publication]/[rkey]/CanvasPage.tsx | 2 +- app/lish/[did]/[publication]/[rkey]/Interactions/Quotes.tsx | 4 +++- app/lish/[did]/[publication]/[rkey]/LinearDocumentPage.tsx | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/lish/[did]/[publication]/[rkey]/CanvasPage.tsx b/app/lish/[did]/[publication]/[rkey]/CanvasPage.tsx index 007774ae..402e72b2 100644 --- a/app/lish/[did]/[publication]/[rkey]/CanvasPage.tsx +++ b/app/lish/[did]/[publication]/[rkey]/CanvasPage.tsx @@ -57,7 +57,7 @@ export function CanvasPage({ { let isMobile = useIsMobile(); const data = useContext(PostPageContext); + const document_uri = data?.uri; let record = data?.data as PubLeafletDocument.Record; let page: PubLeafletPagesLinearDocument.Main | undefined = ( @@ -214,7 +215,8 @@ export const QuoteContent = (props: { let scrollMargin = isMobile ? 16 : e.currentTarget.getBoundingClientRect().top; - let scrollContainer = window.document.getElementById("post-page"); + let scrollContainerId = `post-page-${props.position.pageId ?? document_uri}`; + let scrollContainer = window.document.getElementById(scrollContainerId); let el = window.document.getElementById( props.position.start.block.join("."), ); diff --git a/app/lish/[did]/[publication]/[rkey]/LinearDocumentPage.tsx b/app/lish/[did]/[publication]/[rkey]/LinearDocumentPage.tsx index 302c16bf..24ef7241 100644 --- a/app/lish/[did]/[publication]/[rkey]/LinearDocumentPage.tsx +++ b/app/lish/[did]/[publication]/[rkey]/LinearDocumentPage.tsx @@ -61,7 +61,7 @@ export function LinearDocumentPage({