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:
@@ -152,11 +152,16 @@ export function StaffReportView({
|
|||||||
<div className="h-px bg-rule" />
|
<div className="h-px bg-rule" />
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
{/* 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 && (
|
||||||
<SectionAnchorNav
|
<SectionAnchorNav
|
||||||
sections={data.sections}
|
sections={data.sections}
|
||||||
hasActivities={data.activities.length > 0}
|
hasActivities={data.activities.length > 0}
|
||||||
framed={framed}
|
framed={framed}
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
{membersField && membersField.history.length > 0 ? (
|
{membersField && membersField.history.length > 0 ? (
|
||||||
<MembershipChart
|
<MembershipChart
|
||||||
|
|||||||
Reference in New Issue
Block a user