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

Javascript error when user clicks "Other actions" menu

SA-10760

Summary



User notices a Javascript error when clicking on "Other Actions" menu. Issue happens only when the first menu item under "Other Actions" is disabled and also only on IE 8 browser. Once the Javascript error is thrown, further mouse clicks are rendered useless.



Error Messages



Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus. Files: pega_ui_menubar_13465340811.js!pzpega_ui_launchflow_13910394108.js!!.js, line 283 character 39




Steps to Reproduce



 Issue is reproduced if the first item under the menu "Other Actions" available for flow is disabled.

Root Cause



The root cause of this problem is a defect in Pegasystems’ code/rules. IE-8 throws a JavaScript error when trying to focus a disabled element.

Resolution



This issue is resolved through the following local-change: 

1. 
In UserWorkForm include below script.

<pega:static type="script" app="webwb" moveToEnd="true">
<pega:file name="menubaroverrides.js"/>
</pega:static>



2.  Create a new JS file in application rule set with below details:
    Directory: webwb   
    Filename: menubaroverrides
    File Type: js


3.  Copy and paste the script provided below. Please note that the script below is a template. Update the template to suit your needs. 


                   
function menubarOverrides() {

if (pega.ui.menubar && pega.ui.menubar.Manager) {

pega.ui.menubar.Manager.prototype.doContextMenu = function(XMLNode,oLoc) {

/* Copy and paste your version of doContextmenu from pega_ui_menubar.js.
   ENSURE TO ENCLOSE firstElem[1].focus in a try catch block */

}        
        
    }
}
if(pega && pega.u && pega.u.d){
    pega.u.d.attachOnload(menubarOverrides,true);
}




 
Suggest Edit

Published June 24, 2015 - Updated October 8, 2020

Did you find this content helpful? Yes No

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