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
- Open the Case Manager portal.
- Go to the My Assignments tab.
- Double-click an item to open the assignment in a new tab.
- 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
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.