diff --git a/packages/@ourworldindata/grapher/src/footer/Footer.tsx b/packages/@ourworldindata/grapher/src/footer/Footer.tsx index f6ce00b96ea..22635cd018a 100644 --- a/packages/@ourworldindata/grapher/src/footer/Footer.tsx +++ b/packages/@ourworldindata/grapher/src/footer/Footer.tsx @@ -414,6 +414,12 @@ export class Footer< className="learn-more-about-data" data-track-note="chart_click_sources" onClick={action(() => { + // if embbedded, open the sources modal + if (this.manager.isEmbeddedInAnOwidPage) { + this.manager.isSourcesModalOpen = true + return + } + // on data pages, scroll to the "Sources and Processing" section // on grapher pages, open the sources modal const sourcesIdOnDataPage = diff --git a/packages/@ourworldindata/grapher/src/footer/FooterManager.ts b/packages/@ourworldindata/grapher/src/footer/FooterManager.ts index 182dce9ca28..d373cb74c07 100644 --- a/packages/@ourworldindata/grapher/src/footer/FooterManager.ts +++ b/packages/@ourworldindata/grapher/src/footer/FooterManager.ts @@ -17,4 +17,5 @@ export interface FooterManager extends TooltipManager, ActionButtonsManager { isGeneratingThumbnail?: boolean fontSize?: number isInFullScreenMode?: boolean + isEmbeddedInAnOwidPage?: boolean }