Defect #44791
closedCode block copy button overlapping a right-floating TOC
Description
If the table of contents for a wiki page is located on the right-hand side, the entries in the table of contents are not links if they appear at the same level as the “pre” tag.
Presumably, the “Copy” button for the “pre” tag within the table of contents is causing the problem.

Files
Updated by Go MAEDA 12 days ago
- File wiki-toc-copy-button-44791-before@2x.png wiki-toc-copy-button-44791-before@2x.png added
- File wiki-toc-copy-button-44791-after@2x.png wiki-toc-copy-button-44791-after@2x.png added
- File 0001-Fix-the-code-block-copy-button-overlapping-a-right-f.patch 0001-Fix-the-code-block-copy-button-overlapping-a-right-f.patch added
- Category changed from Wiki to Text formatting
- Target version set to 6.1.7
The attached patch fixes this issue.
The copy button is positioned relative to div.pre-wrapper, which wraps the <pre> element. When the table of contents floats on the right, the <pre> element becomes narrower, but div.pre-wrapper does not. As a result, the copy button is displayed over the TOC, and div.pre-wrapper covers the TOC links so that they cannot be clicked.
The patch sets display: flow-root on div.pre-wrapper so that it also becomes narrower.
Before:
After:
Updated by Andrea Ludin 11 days ago
Perfect. That was fast!
The patch solves the issue on our two Redmine instances (7.03), one with the default theme, one with moonstone-2.1.0.
Updated by Go MAEDA 9 days ago
- Subject changed from Wiki TOC on right side links missing on pre-tag height to Code block copy button overlapping a right-floating TOC
- Status changed from New to Resolved
- Assignee set to Go MAEDA
- Resolution set to Fixed
Committed the patch in r25482. Thank you for reporting this issue.