Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-39654

Expand Macro Collapses Collapsible Code Block Macro

    XMLWordPrintable

Details

    Description

      NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.

      This appears to be a regression in the way that the Expand Macro handles Collapsible Code Block macros embedded within the Expand Macro and has been reported by multiple clients.

      Problem

      The use case is that there are multiple (and typically large) code blocks inside the expand macro. Since all of the code blocks aren't needed to be seen, the user typically has the collapsible code block inside of the expand macro. Apparently this setup used to work at some point, but the macro hasn't been behaving properly.

      So the end goal is to have an expand macros, with multiple collapsible code blocks nested inside of it. The expected behavior is that a user can expand the expand macro, then expand a code block that is listed under it and see the information in that code block.

      The current behavior is that a user expands the expand macro, then clicks to expand a code block. Immediately after clicking the option to expand the code block, the expand macro automatically collapses itself. This causes the user to have to re-expand it to try to see the code block. Then, if they need to click on another code block, the expand macro auto collapses itself again. The cycle is then repeated.

      Previously, this functionality worked within the macro, not sure why the regression has occurred (post upgrade from 5.4.4 to 5.8.13).

      Replication steps

      1. Create "Expand" Macro
      2. Within expand macro, create nested "Code Block" macro
      3. click on code block macro and select "collapsable" option.
      4. Save the page. Click on expand macro then click on code bloc "collapse source:
      Expected behavior

      • Only codeblock content will be collapsed

      Actual result
      Codeblock macro is collapsed as well as parent Expand macro

      Workaround

      Workaround exists to have the user nest an expand macro inside another expand macro and put the non-expandable code macro inside of the second level of expand macro. This does what the user is trying to do, but given that in the past the code macro inside of the expand macro did work.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ctalk chucktalk
              Votes:
              23 Vote for this issue
              Watchers:
              24 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: