Skip to content

Commit

Permalink
Merge pull request #2898 from owid/fix-full-screen-scroll-to-sources
Browse files Browse the repository at this point in the history
fix: exit full-screen mode when scrolling to the Sources section
  • Loading branch information
sophiamersmann authored Nov 6, 2023
2 parents 9ce46ed + df90b1e commit 0652996
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/@ourworldindata/grapher/src/footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,10 @@ export class Footer<
sourcesElement.scrollIntoView({
behavior: "smooth",
})
this.manager.isInFullScreenMode = false
} else if (sourcesElement) {
window.location.hash = "#" + sourcesIdOnDataPage
this.manager.isInFullScreenMode = false
} else {
this.manager.isSourcesModalOpen = true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ export interface FooterManager extends TooltipManager, ActionButtonsManager {
framePaddingHorizontal?: number
isGeneratingThumbnail?: boolean
fontSize?: number
isInFullScreenMode?: boolean
}

0 comments on commit 0652996

Please sign in to comment.