Render bug when collapse = true" set on a code block macro embedded within an Expand macro
Asked by Mike Ely:

Try this:

Add an Expand macro to a page. Within that Expand, add a Code Block macro and select "Collapsible" in the object properties. Make sure you've got some text within and without both macros.

Here's what I've seen on two separate computers (both using Firefox but different OSs):

Select the link for the Expand macro, there's the content including a code block that simply shows a link for "Expand source"

Click Expand Source, now the entire Expand macro (not the code block macro!) collapses although the pointer next to the outer Expand macro now points down, indicating the expand is open.

Click the text for the Expand macro again, and the code block is now displayed correctly, although the expand macro position indicator toggles into the wrong position once more.

For extra fun, put multiple "collapsible = true" code blocks within your expand macro and try to view them all.


Answers:
author: Thomas Deiler
body: Dear [@Mike Ely](/t5/user/viewprofilepage/user-id/58746),

can you please provide following information to reproduce your finding:

* Confluence Version
* both Browser Versions incl OS type
* A sample screen shot

Many Thanks

Thomas

comments: author: Mike Ely
body: [@Thomas Deiler](/t5/user/viewprofilepage/user-id/484715)I have answered your questions below.


author: Thomas Deiler
body: Dear [@Mike Ely](/t5/user/viewprofilepage/user-id/58746),

I reproduced it even with an older version of confluence and Chrome.

I will raise a bug at Atlassian for you (they will love me for that 8)

I report back.

So long

Thomas


author: Mike Ely
body: Thank you sir. Have a great workweek.


author: Thomas Deiler
body: It is already a known bug: [CONFSERVER-39654](https://jira.atlassian.com/browse/CONFSERVER-39654) and [CONFSERVER-33274](https://jira.atlassian.com/browse/CONFSERVER-33274)


author: Thomas Deiler
body: If satisfied, please accept this response.


author: Mike Ely
body: Ugh, look how stale that bug is. Devops kids these days I tellya. They'd rather do "important" things like disable the ability to indent in the text editor than fix longstanding bugs. Argh...

Anyhow, thank you for digging in to this with me. Pity [@atlassian](/t5/user/viewprofilepage/user-id/1166177) hasn't paid it any mind.


author: Thomas Deiler
body: You can vote for it! ;)


author: Mike Ely
body: For whatever it's worth, I did. Seems like bugs that don't get about 1k votes are ignored though.


author: Mike Ely
body: * Confluence 6.7.0
* Firefox 52.6.0 on opensSUSE Leap and 58.0.2 on Windows 10 (both 64-bit)

<br />

Screenshot before expanding the Expand macro:

![1.png](https://community.atlassian.com/t5/image/serverpage/image-id/15835i9F6C58FEB751DFCE/image-size/large?v=v2&px=999 "1.png")

After I expand the Expand:

![2.png](https://community.atlassian.com/t5/image/serverpage/image-id/15838i4FEAF844BD2343B5/image-size/large?v=v2&px=999 "2.png")

After I click "Expand source" (the code block briefly appears for less than a second and then vanishes):

![3.png](https://community.atlassian.com/t5/image/serverpage/image-id/15839i4C48184721A5824C/image-size/large?v=v2&px=999 "3.png")

Note the position indicator to the left of "Here's the outer..." - it's in the expanded position although the expand block is collapsed. Clicking the expand text again results in:

![4.png](https://community.atlassian.com/t5/image/serverpage/image-id/15840i7BD4F7F9D07C98CF/image-size/large?v=v2&px=999 "4.png")

Again, note the position indicator next to the expand text - it's in the collapsed position although now both the expand macro and embedded code block are expanded (the code block correctly indicates its position btw).

I hope this helps you better understand what I'm talking about.

Cheers,

Mike

comments: author: Mike Ely
body: Also, the first time I typed the above reply with screenshots (took about fifteen minutes including screenshots, I got this *utterly maddening* error:

![wtf.png](https://community.atlassian.com/t5/image/serverpage/image-id/15841i9B692DE077FC2A03/image-size/large?v=v2&px=999 "wtf.png")

And yes, that did delete all my input and I did have to re-upload all the screenshots. Considering Atlassian builds webapps as a core competency, this is inexcusable.


author: Thomas Deiler
body: Dear [@Mike Ely](/t5/user/viewprofilepage/user-id/58746),

yes, this has happened to me also a couple of times. But I am the wrong person to tell. I belong to a community of volunteer answering user questions. You have to address this with the session expiration to Atlassian directly.

So long

Thomas


author: Mike Ely
body: [@Thomas Deiler](/t5/user/viewprofilepage/user-id/484715)do you feel that the explanation of the bug is sufficient?

<br />

Many thanks,

Mike


Tags: bug