Support Article
Modal window re-sizes when it receives field level error message
SA-51828
Summary
Modal window re-sizes when it receives field level error messages.
Error Messages
Not Applicable.
Steps to Reproduce
- Configure a modal flow action on click of link
- Add messages to a property on the flow action post processing activity. The modal window re-sizes when the messages are displayed on the field
Root Cause
A defect in Pegasystems’ code or rules. Modal dialog re-sizes automatically when errors display on it.
Resolution
Perform the following local-change:Add the below script within script tag in the UserWorkForm HTML rule:
pega.u.d.attachOnload(function() {
pega.u.d.modalDialog.subscribe("show",function(){
var modalContent = document.getElementById('modalContent');
if(modalContent){
var modalContentOffsetWidth = modalContent.offsetWidth;
modalContent.style.maxWidth = ""+modalContentOffsetWidth+"px";
}
});
pega.u.d.modalDialog.subscribe("hide",function(){
var modalContent = document.getElementById('modalContent');
if(modalContent){
var modalContentOffsetWidth = modalContent.offsetWidth;
modalContent.style.maxWidth = "";
}
});
}, false);
Published March 3, 2018 - 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.