Details
-
Bug
-
Resolution: Unresolved
-
Medium
-
None
-
7.4.3, 7.7.2, 7.16.1
-
4
-
Severity 3 - Minor
-
1
-
Description
Issue Summary
When a macro is inserted in a page, the Confluence editor adds the following HTML tag before the macro code:
<p class="auto-cursor-target"><br /></p>
Pointing the editor cursor to the line with this code and adding line breaks will create new paragraphs with the same class tag.
When the page is published, these paragraphs are not rendered as expected in page view mode, since they are not treated as new lines.
Steps to Reproduce
- Install a vanilla instance of Confluence.
- This was validated on Confluence 7.4.3 and 7.7.2.
- The issue did not exist on Confluence 6.6.3 nor on 6.13.4.
- The issue does not occur if Collaborative Editing is disabled on the affected versions.
- Create a new Space.
- Create a sample page.
- In the first line of the page add an Info Macro.
- Use the up arrow keyboard button to go the previous line and add another Info Macro.
- Use the down arrow keyboard button to go the next line, which will be between both macros.
- Use the return (enter) keyboard button to add new lines between the two macros.
- Publish the page.
Expected Results
When the page is displayed, the new lines created between the two Info Macros are properly rendered as blank space.
Actual Results
There's no new line between the two macros.
If you check the storage format it will be as below:
<p class="auto-cursor-target"><br /></p><ac:structured-macro ac:name="info" ac:schema-version="1" ac:macro-id="03a53bba-bd52-43fb-b8bb-ef7efd2e172d"><ac:rich-text-body> <p><br /></p></ac:rich-text-body></ac:structured-macro> <p class="auto-cursor-target"><br /></p> <p class="auto-cursor-target"><br /></p> <p class="auto-cursor-target"><br /></p> <p class="auto-cursor-target"><br /></p> <p class="auto-cursor-target"><br /></p> <p class="auto-cursor-target"><br /></p> <p class="auto-cursor-target"><br /></p><ac:structured-macro ac:name="info" ac:schema-version="1" ac:macro-id="01b6f70e-1335-4b03-9428-c6dd60592343"><ac:rich-text-body> <p><br /></p></ac:rich-text-body></ac:structured-macro> <p><br /></p>
Workaround
When editing the page, select all lines between the macros and use the CMD+0 (CTRL+0) keyboard shortcut to change them to the regular paragraph formatting.