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

Issue with triggering of hot key on the parent window from popup

SA-21196

Summary



An icon was designed to open a modal window on click. Hot keys, like Alt with N, Alt with S, and so on, can be used in the background and the system proceeds further even if fields in the modal window are not selected when the modal window is opened.

Error Messages



Not Applicable

Steps to Reproduce



1. Launch a local action in modal dialog.
2. Press Alt and N when the modal window is opened.

Root Cause



A defect in Pegasystems’ code or rules.
When hot keys are configured, it generates an accessKey attribute on the buttons, icons, or links. So when accesskey attribute is generated, the action is configured on the data-click.

Resolution



Perform the following local-change:

1. Add the below code snippet in UserWorkForm rule.
2. Call run script action with function resetDisableFlag before and after the Launch > Local action, respectively.

Code Snippet:
<script>
function resetDisableFlag(disable){
  var eles = $("[accesskey]");
  var eleLength = eles.length;
  for(var i = 0; i < eleLength; i++){
      var el = eles[0];
      if(disable){
          if(el && !el.disabled){
              el.setAttribute("disabled",true);
              el.setAttribute("data-disabled-modal",true);
          }
      } else {
          var dataDisabledModal =  el.getAttribute("data-disabled-modal");
          if(el && dataDisabledModal){
              el.removeAttribute("disabled");
              el.removeAttribute("data-disabled-modal");
          }          
      }
  }
}
</script>

Suggest Edit

Published March 24, 2016 - 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