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.
This commit is contained in:
Joel Brock
2026-06-09 17:22:27 -07:00
parent 38f4738eca
commit 2e1244aa47
+10 -5
View File
@@ -152,11 +152,16 @@ export function StaffReportView({
<div className="h-px bg-rule" /> <div className="h-px bg-rule" />
</header> </header>
<SectionAnchorNav {/* Hide the anchor strip when framed in CiviCRM: the iframe has no
sections={data.sections} internal scroll context (it auto-sizes to content), so anchor
hasActivities={data.activities.length > 0} clicks change the hash but don't move the parent page. */}
framed={framed} {!framed && (
/> <SectionAnchorNav
sections={data.sections}
hasActivities={data.activities.length > 0}
framed={framed}
/>
)}
{membersField && membersField.history.length > 0 ? ( {membersField && membersField.history.length > 0 ? (
<MembershipChart <MembershipChart