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

'Leave page/Stay on page' warning (Internet Explorer)

SA-6629

Summary



After double-clicking an assignment in the My Assignments tab opens the assignment in a new tab, the problem starts when the user tries to visit the My Assignments tab again. The Work area tab has autorefresh enabled on every visit. So when the user comes back to the My Assignments page, the page refreshes and displays the unnecessary "Leave page/stay on page" warning.

ERROR MESSAGES

Leave page/stay on page

STEPS TO REPRODUCE
  1. Open the Case Manager portal.
  2. Go to the My Assignments tab.
  3. Double-click an item to open the assignment in a new tab.
  4. Revisit the My Assignments tab.


Root Cause



A defect in Pegasystems code/rules. The issue occurs when the dirty flag is enabled. 


Resolution



Perform the following local-change:
Adding the following JavaScript on UserWorkForm sets the pega.d.gDirtyOu.verrride=false to 'false' on harness unload. 

<script>
pega.util.Event.removeListener(window,"beforeunload",pega.u.d.harnessOnBeforeUnload);
var orig, orig1, flag;
if(!orig)
orig=pega.u.d.harnessOnBeforeUnload;
if(!orig1)
orig1=pega.u.d.explorerFormIsDirty;
pega.u.d.harnessOnBeforeUnloadTest = function(event){
   if(!event) event=window.event;
   if(event && event.clientY<0)
   pega.u.d.gDirtyOverrride=null;
   else{
   pega.d.gDirtyOverrride=false;
flag = true;
}
orig.call(this,event);
};
pega.u.d.explorerFormIsDirty = function(){
if(flag){
pega.u.d.gDirtyOverrride=false;
flag=false;
return pega.u.d.gDirtyOverrride;
}else{
orig1.call();
}
};
pega.util.Event.addListener(window,"beforeunload",pega.u.d.harnessOnBeforeUnloadTest);
</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