-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
5.9.4, 5.9.14, 5.10.7, 6.0.7, 6.1.1, 6.2.1, 6.2.4, 6.6.7, 6.7.2, 6.9.1, 6.11.0
-
8
-
Severity 3 - Minor
-
1
-
Summary
Back button in browser does not return to previous page when using URL with anchor link
Environment
- Any browser
- Confluence 6.2.1
Steps to Reproduce
- Create Page A with content that scrolls beyond the bottom of the screen, with several headings in the content that also go below the fold
- Add a table of content macro at the top of Page A
- Create Page B and insert Web Links with anchors from the table of contents to point to headings on Page A after the fold, for example
- Save Page B
- Click on the link to go to Page A with the anchor
- Click the back button in the broswer
Expected Results
The browser goes back to page
Actual Results
You need to click twice to return to the previous page
Notes
The page rendering is completely different in newer versions of Confluence which is why this bug doesn't appear in older, EOL versions. The left hand nav and floating toolbar are new and are likely to be part of the issue here.
Workaround
The same workaround mentioned in CONFSERVER-40462 can be applied for this case (actions on Page A):
- Insert a new macro: Table of Content Zone
- Drag your original table of content macro icon into the new Table of Content Zone
- Click "Save"
I'm seeing what appears to be the same issue but from a somewhat different situation. We use a tool to generate HTML from some other content and then use the REST APIs to populate a page with that HTML. The generated HTML creates a TOC with <a href=#some-id> tags and then sets id=some-id attributes on other tags. (We had to jump through hoops to work around the id prefix manipulation done by Confluence, but we've worked out that issue.) The result is that clicking a link in the TOC jumps to the element with the corresponding id attribute, but the Back button doesn't return to the top. We haven't inspected the page source, but whatever Atlassian has done to interfere with the behavior of the Back button is infuriating.
The notion here applies (though somewhat backhandedly).