Skip to content

Conversation

@Mary-Clb
Copy link

Checklist before requesting a review

Please delete options that are not relevant.

  • I have read the CONTRIBUTING document.
  • I have performed a self-review of my code.
  • I have added tests that prove my fix is effective or that my feature works.
  • This change requires a documentation update.

Description

It fixes !39937

The color picker no longer appears when clicking on the affected fields; only the color value in text (hexadecimal) is visible.
This issue was caused by an ID mismatch: different IDs were assigned by the color and field macros. The color macro script applied CSS and JS escaping on the ID for security reasons (see related PRs below), which created inconsistencies.

This fix:

  • Initializes the color pickers using a class instead of the dynamic ID

Links to related PRs : #21483 - #21246

@Mary-Clb Mary-Clb requested a review from Rom1-B October 27, 2025 10:19
@Mary-Clb
Copy link
Author

Patch sent to the partner : waiting for validation feedback

@trasher trasher added the javascript Pull requests that update Javascript code label Oct 27, 2025
@trasher trasher removed their request for review October 27, 2025 13:34

<script>
$(function () {
$("#{{ options.id|e('css')|e('js') }}").spectrum({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#21483 should permit to not have to change the selector.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants