Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Header collapses or expands on click of any icon on it

SA-16421

Summary



Some icons are placed on a collapsible header. On clicking any of these icons, the header expands or collapses which is not the expected behavior.


Error Messages



Not Applicable


Steps to Reproduce



1. Place any icon in collapsible bar
2. Click it, the layout is expanded if it is in collapsible mode and vice versa.

 

Root Cause



A defect in Pegasystems’ code or rules. When user clicks on the icon, the target appears as img tag due to which header is expanding or collapsing.


Resolution



Perform the following local-change: 

In expandHeader API add a check for img tag.

Add below code snippet in UserWorkForm.

<script>
try {
if(typeof(pega.u)!="undefined" && typeof(pega.u.d)!= "undefined" ) {
pega.u.d.detachOnload(overrideExpandHeader, true);
pega.u.d.attachOnload(overrideExpandHeader, true);
} else {
pega.util.Event.removeListener(window, "load", overrideExpandHeader);
pega.util.Event.addListener(window, "load", overrideExpandHeader);
}
} catch(e) { }
function overrideExpandHeader(){
pega.u.d.expandHeader = function (expandElement, event, container){
var target = pega.util.Event.getTarget(event);
if(!target.tagName.match(/^(input|select|textarea|button|a)$/gi)) {
if(target.tagName.toLowerCase() == "i" || target.tagName.toLowerCase() == "img") {
if(target.getAttribute("data-ctl") && target.getAttribute("data-ctl") == "Icon") {
return;
}
}
if(container){
this.loadContainer(expandElement, event, container);
} else {
this.expandIt(expandElement, event);
}
}
};
}

</script>
Suggest Edit

Published January 31, 2016 - Updated October 8, 2020

Did you find this content helpful? Yes No

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us