-
Type:
Bug
-
Resolution: Low Engagement
-
Priority:
Low
-
None
-
Affects Version/s: 6.7.0
-
Component/s: Web Interface - AUI
-
Severity 3 - Minor
Description:
AJS.$('#labels-section') resolves to AJS.$(' (None) -section') when used in Main Layout template causing the selector to fail during execution.
To Reproduce:
Add the following code
#if ($userAccessor.hasMembership('confluence-users', $helper.action.remoteUser.name)) #else <script type="text/javascript"> AJS.toInit(function(){ AJS.$('#labels-section').hide(); }); </script> #end
to Main layout template just after </html> tag. Debug on page refresh and notice "#labels" has been replaced with "(None)".
Expected:
Selector resolves to #labels
Actual:
Selector resolves to (None)
Temporary workaround:
Replace
AJS.$('#labels-section').hide()
with
document.getElementById("labels-section").style.display = "none";
Link to Community post: