Support Article
Autocomplete onChange executes twice
SA-98038
Summary
onChange events are configured in the Actions tab of an Autocomplete control. On selecting data from the Autocomplete control the first time, the onChange event executes once. However, the second time, on selecting an entry, the onChange event executes twice.
Error Messages
Not Applicable
Steps to Reproduce
- Configure an Autocomplete control in a section.
- Add a few onChange events in the Actions tab of the Autocomplete control.
- Select data in the field using the Enter Key (on the keyboard). The onChange event executes once.
- Delete the selected data using the keyboard.
- Select data using the Enter key. The onChange event executes twice.
Root Cause
A defect in Pegasystems’ code or rules.
When the user deletes the autocomplete value and selects another value using the Enter key, the onChange event triggers and its corresponding configured actions are executed. Additionally, in the Refresh section callback in the processinlinescripts(), the data-change on the stale Document Object Model (DOM) is executed resulting in another onChange event.
Resolution
This feature is implemented in Pega Platform 8.3.2.
Tags:
Published October 2, 2020 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.