Skip to content

Commit

Permalink
Make collapsing a page in inline references work
Browse files Browse the repository at this point in the history
  • Loading branch information
Stvad committed Jun 2, 2023
1 parent 9b410dd commit 7456f3d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ts/core/roam/references.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ export const expandLastBreadcrumb = () => {
}

export const closePageReferenceView = () => {
const referenceItem = RoamBlock.selected().element?.closest(Selectors.pageReferenceItem)
const referenceItem = RoamBlock.selected().element?.closest(
Selectors.pageReferenceItem + ',' + Selectors.inlineReference
)
const foldButton = referenceItem?.querySelector(Selectors.foldButton)

if (foldButton) Mouse.leftClick(foldButton as HTMLElement)
Expand Down

0 comments on commit 7456f3d

Please sign in to comment.