Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

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');"
Suggest Edit

Published January 31, 2016 - Updated October 8, 2020

Did you find this content helpful? Yes No

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us