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 after error message occur

SA-5588

Summary



Screen scroll behavior responds properly to click on any field (Radio button switch or any list viewing etc) before encountering page validation error. After displaying error message, screen is getting altered and navigating to top upon click on any field on screen.

Error Messages



After displaying error message, screen is altered and navigates to top when any field on screen is clicked.


Steps to Reproduce



After displaying error message, screen is getting altered and navigating to top upon click on any field on screen.


Root Cause


In defaultErrorDivInit api of pzpega_ui_doc_errors.js file. I found an accessibility story that has been added.This causes the behavior.
 
/*(accessibility story) focus on error table start*/
                              var accessErrorTable=document.getElementById("ERRORTABLE");
                              if(!pega.u.d.bModalDialogOpen && accessErrorTable && accessErrorTable.getAttribute("role")=="alert"){
                                             /*BUG-162342: Adding try-catch below*/
                                             try {
                                                            accessErrorTable.focus();
                                             }
                                             catch(e){}
                              }
                              /*(accessibility story) end*/


Resolution



The behaviour is intentional because user should be focused to the next important element in the form, here is the error.

Customer wants to ovveride this function.In order to override the function follow the below steps:
  1. Open the UserWorkForm html fragment.
  2. Core apis always bounds to pega.ui.Doc namespace so you need to override with pega.ui.Doc namespace as
 <script>

pega.ui.Doc.prototype.defaultErrorDivInit = function (errorText) { 

// TODO: Place complete function code here and remove only the code which is not required.

} </script>


 
 

Published January 31, 2016 - Updated October 8, 2020

Was this useful?

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.

Did you find this content helpful?

Want to help us improve this content?

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