Symptom
A modal dialog box fails to submit a form on clicking a button for the first time.
Explanation
A modal dialog box is configured with an Out-Of-The-Box (OOTB) button and an input field such as a Text Area. After entering a value in the input field, the user clicks on the button expecting to submit the form. However, it fails to submit the form on the first click. This is the expected behavior. After entering a value in the input field, OnChange event is not triggered as the focus is still on the input field. Consequently, OnChange event fails to trigger Post Value action that changes the focus from the input field to the button for submitting the form.
Environments
The problem was reported in the following environments:
- Pega Platform™ 8.6.2 on-premises
- Pega Platform 8.7.5 in Pega Cloud® services 2.24.4
Solution
Perform the following local change:
To submit the form of a modal dialog box, explicitly change the focus from the input field to the button so that clicking it for the first time submits the form.
Related content
Pega Documentation
Configuring a modal dialog box for a button
Harness and Section forms: Help — Client Event Editor