Issue Bug Closed

#108488TCA-Type Color - JavaScript-based color picker not accessible in native HTML <dialog>-element

Richard Krikler 12/15/25, 14:14 updated 03/31/26, 08:59

Description

When trying to interact with the TCA-type “Color” the JavaScript-based color-picker inside a backend dialog (now native “

“-element) the UI is not accessible/ visible as it is not inside the dialog-element.

clipboard-202512151254-homr1.png

Steps to Reproduce

Example usage of TCA-type Color: Backend > Settings > Extension Configuration > backend > “Highlight Color (login.loginHighlightColor [color])”

The Alwyn color-picker (https://sefianecho.github.io/alwan/) is outside of the “

“-element:
clipboard-202512151516-28gd0.png

Suggestion

To solve this problem, it would be necessary to move the element into the

-element.

This can be done by defining the “parent”-option of the Alwan color-picker.
(Solution suggestion from Build/Sources/TypeScript/backend/color-picker.ts)

      const alwan = new Alwan(inputElement, {
        position: 'bottom-start',
        format: 'hex',
        opacity: this.opacity,
        swatches: this.swatches ? this.swatches.split(';') : [],
        preset: false,
        color: this.color,
        parent: 'typo3-backend-color-picker'
      });

Problem: the position of the color-picker is still not correct. After adding the parent option, the color-picker position is fixed in the browser window, as the color-picker checks for the scroll-position of the page (not the dialog) and adds/adjusts the inline-css property for positioning (transform: translate(…)).

clipboard-202512151552-gt25b.png

To solve this issue, it is necessary to update the color-picker library from v2.2.0 to v2.3.0 (https://github.com/sefianecho/alwan/releases/tag/v2.3.0).

Now the color-picker stays where it should → directly under the TCA field.

clipboard-202512151604-4hpxv.png

*Reference*
There is a gread example by Stephanie Eckles on how the layering of dialog & popover work:
“Top layer troubles: popover vs. dialog” > “Regaining popover access
” – https://www.htmhell.dev/adventcalendar/2025/1/
https://codepen.io/5t3ph/pen/qEbKpJd/57e8ec936911cf8549df0df72c650650

Reviews 3