Anchor / heading links and TOC entries do not correctly navigate to headings inside Expand macros on the same page in Confluence Cloud.

XMLWordPrintable

    • 1
    • Major

      Summary

      Anchor / heading links and TOC entries do not correctly navigate to headings inside Expand macros on the same page in Confluence Cloud.

      Environment

      • Product: Confluence Cloud
      • Editor: New editor
      • Macros involved:
        • Expand
        • Table of Contents (TOC)

      Steps to Reproduce

      1. Create a Confluence Cloud page using the new editor.
      2. In the page body (top level, not inside any macro), add:
        • Heading A (e.g. "Heading outside expand")
      3. Insert an Expand macro.
      4. Inside the Expand macro, add:
        • Heading B (e.g. "Heading inside expand")
      5. Generate heading links for both headings or add a Table of Contents (TOC) macro that includes both headings.
      6. Publish the page.
      7. From the published page, click the heading link (or TOC entry) pointing to Heading B inside the Expand while the Expand is initially collapsed.

      Expected Results

      • Clicking the heading link / TOC entry for a heading inside an Expand should:
        • Automatically open the relevant Expand macro (if it is collapsed), and
        • Scroll the page to bring the target heading into view.
      • This should behave the same as headings that are directly on the page body, and should work whether:
        • The page is opened normally, or
      • The link is opened in a new tab/window.

      Actual Results

      • When the target heading is inside an Expand macro and the Expand is collapsed:
        • Clicking the heading link / TOC entry does not scroll to the heading.
        • The Expand macro remains closed.
      • If the user manually opens the Expand once and then closes it:
        • Clicking the link will sometimes scroll only to the Expand macro container, but it still does not open the Expand or scroll to the heading itself.
      • When opening the same link with "Open link in new tab":
        • The behaviour can be different: the Expand may open and scroll correctly to the heading, which suggests the content is present but not handled correctly in the normal navigation flow.

      Impact

      • Customers cannot reliably use:
        • Heading anchor links to jump to content inside Expand macros on the same page.
        • TOC entries that point to headings inside Expands.
      • This breaks common documentation patterns where Expands are used to organize long pages while still supporting "jump-to-section" navigation.
      • Particularly problematic for:
        • Knowledge base / help center documentation.
        • Long technical docs with nested sections.

      Workarounds

      • Manually open the Expand macro before clicking the anchor / TOC link (works only partially and is not intuitive for end-users).
      • Opening the link in a new tab sometimes works (Expand opens and scrolls), but this is not a viable UX workaround.

              Assignee:
              Unassigned
              Reporter:
              Tanya -
              Votes:
              7 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: