-
Bug
-
Resolution: Unresolved
-
Medium
-
None
-
5.3
-
1
-
Severity 2 - Major
-
1
-
NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.
When a page contains multiple instances of the future macro which contain expand macros, only the expand macros in the last future macro invoked expand properly. Expand macros on the other (not-invoked-last) future briefly expand then immediately de-expand.
Why Confluence Expand macro fails:
Confluence expand macro binds expand-control elements with "click" and "keyup" events when expand-control found on a page. In case of future macro, since it loads asynchronously, binding occurs multiple times for the expand control which loads first.
Proposed Fix:
Confluence expand macro shall unbound all events before binding to events, so that events already bound to elements will be cleared. And then bind events to elements afresh.
$elements.length && $elements.unbind(eventNames); // FIX: unbound events before binding $elements.length && $elements.bind(eventNames, helper.createToggleFunction(eventMatcher));
With this fix put in place for confluence expand macro, it works well with multiple expands with or without future macro.
- relates to
-
CONFCLOUD-40562 Expand macros in multiple future macros only expand properly for last future macro invoked
-
- Closed
-
- causes
-
DEVHELP-334 Failed to load
I'm encountering a similar problem, but all Expand macros are immediately auto-collapsing. Doesn't matter if I put Expand inside Future, or Future inside Expand.
I made a page that consists only of:
And it still exhibits this issue.
Currently on Confluence 7.12.0
EDIT: found a workaround? Setting the Future macro to use manual rendering, and placing Expand inside Future, appears to avoid this issue.