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

Events do not get triggered for ColorPicker controls



ColorPicker controls is associated with a property which has a default value. And an OnChange event is configured to refresh the section. However, when a new color is chosen in runtime, the color does not get reflected with the new value. It gets reflected only when the section is refreshed explicitly.

Error Messages

Not Applicable.

Steps to Reproduce

1. Configure a property to use colorpickers control as below. 
2. Use a default value say "#020202". 
3. Associate an OnChange event to refresh the screen. 
4. During Runtime, after selecting a new color the hex gets updated but the color does not change. 

Root Cause

There were two issues with this:

1. Color not getting changed when that field has default value.

Providing a default value for the background color sets the color in the inner div which does not get replace on update. So we get to see the default color all the time -  which is why always inner div background color gets displayed in the client. N background color needs to be set on the inner div as we set it to the outer div. 

2. Events do not get fired after changing the color.

In processDialog api , change event is not fired on submitting the changes from the color picker modal dialog.


Hfix-21244 helps address the issue. Removing the background-color property on the inner div fixes the issue with color changes not getting reflected.

In ColorPicker control based on the UsedInApplicationSkinWizard param, and based on the OnChange event configured adding events conditionally. Adding these conditions and firing the change event from processDialog api fixes the issue with event not getting fired.
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