Double Clicking on Confluence Code Block Macro Doesn't Disable Formatting
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
After upgrade Confluence to version 5.9 or above, double-clicking on a multi-line code snippet doesn't disable formatting but it selects/highlights the entire code block instead.
Cause
The behavior is due to Code Block macro bundled with Confluence version 5.9 or above are now using the open source API SyntaxHighlighter and double-clicking it now will select the entire code block instead. The defaults behavior for it as stated in their update note below:
Workaround
Copy from a Confluence 5.8.x installation (located under
<confluence-installation>/confluence/WEB-INF/
atlassian-bundled-plugins)
:newcode-macro-plugin-2.1.7.jar
Replace the plugin under
<confluence-installation>/confluence/WEB-INF/
atlassian-bundled-plugins
Archive the newer version of code block plugin
Restart Confluence
Test the code block plugin
ℹ️ Suggestion Ticket to Remove the Double-Clicking Feature: CONFSERVER-43063 - Remove double-click to select all in Code Block.
Was this helpful?