Support Article
Pega OOTB ColorPicker does not work properly in PRPC 6.3 SP1
SA-15754
Summary
The behavior is reported on PRPC 6.3 SP1. User is having a section in their application. This section is using OOTB colorpicker control.
During run-time, when the user clicks on the control, a color palate opens.User chooses a color and closes the color palate. But the selected color is not set for the color picker control.
If the same section is previewed then it works fine. Only during the runtime the control is not showing the selected color. There is no error in the tracer logs.
Error Messages
Not Applicable.
Steps to Reproduce
1. Create a section with colorpicker control.
2. Have a property referenced to it.
3. Save the section and execute the flow.
Root Cause
The root cause of the reported issue is that the same "id" of the colorpicker div was being used elsewhere in the DOM. There were multiple "id" on the same page.
Resolution
Perform the following local-change :
ID is not unique at user's end. To make the id unique Pega created timestamp like below:
<%
String timestamp = new Date().getTime();
%>
The same is used as shown below :
ID="color<pega:reference name="$this-name" mode="normal" /><%= timestamp %>Field"
onkeyup="pega.ui.ColorPicker.hexUpdate(this, 'color<pega:reference name="$this-name" mode="normal" /><%= timestamp %>Swatch');"
onpaste="pega.ui.ColorPicker.hexDelayUpdate(this, 'color<pega:reference name="$this-name" mode="normal" /><%= timestamp %>Swatch', 50);"
onchange="pega.ui.ColorPicker.hexUpdate(this, 'color<pega:reference name="$this-name" mode="normal" /><%= timestamp %>Swatch');"
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.