-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
Component/s: Macros - Other - 3rd Party
-
1
-
Severity 3 - Minor
-
1
Issue Summary
When calling router.navigate (from @forge/bridge) with a Confluence page URL that includes an anchor from inside a Forge macro, the page loads successfully but fails to scroll to the location specified by the anchor.
Steps to Reproduce
- Create a Forge macro in Confluence with the following manifest configuration:
macro: - key: test-anchor-macro resource: main render: native resolver: function: resolver title: Test Anchor Navigation description: Test macro for anchor navigation
- Add a button or similar UI element that calls router.navigate with a Confluence page URL containing an anchor
- Use code similar to the following example:
const handleNavigateClick = () => { router.navigate("https://example.atlassian.net/wiki/spaces/MYSPACE/pages/123456789/Page+Title#heading-anchor"); };
- Click the button to trigger navigation
- Observe the page navigation behavior
Expected Results
The Confluence page should load in the current tab and automatically scroll to the position indicated by the anchor in the URL, bringing the anchored section into focus.
Actual Results
The Confluence page loads correctly, but the page does not scroll to the anchor location. The user remains at the top of the page instead of being scrolled to the targeted section.
Workaround
The issue happens only with router.navigate, if you update the macro body to directly include the link instead, then clicking the link seems to work and scroll to the desired location.