From 2e1244aa476ede9abd3fa90b12d1c8ee6409b2aa Mon Sep 17 00:00:00 2001 From: Joel Brock Date: Tue, 9 Jun 2026 17:22:27 -0700 Subject: [PATCH] Staff report: hide section anchor nav when framed in Civi The iframe in the Engagement Report tab is sized to fit content, so it has no internal scroll context. Clicking an anchor link inside it changes the URL hash but the iframe content doesn't move and the user has to scroll the outer CiviCRM page manually. Rather than coordinate cross-frame scroll with the parent, just skip rendering the anchor strip when framed. Standalone view is unchanged. --- components/StaffReportView.tsx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/components/StaffReportView.tsx b/components/StaffReportView.tsx index 2ff795d..c53e7c6 100644 --- a/components/StaffReportView.tsx +++ b/components/StaffReportView.tsx @@ -152,11 +152,16 @@ export function StaffReportView({
- 0} - framed={framed} - /> + {/* Hide the anchor strip when framed in CiviCRM: the iframe has no + internal scroll context (it auto-sizes to content), so anchor + clicks change the hash but don't move the parent page. */} + {!framed && ( + 0} + framed={framed} + /> + )} {membersField && membersField.history.length > 0 ? (