BUGFIX: Color picker appears behind theme editor (#2321)

* BUGFIX: Color picker appears behind theme editor

* Remove unnecessary newline
This commit is contained in:
catloversg
2025-10-03 06:24:04 +07:00
committed by GitHub
parent 66a5c9568b
commit 7225a2b22e

View File

@@ -19,6 +19,19 @@ ReactDOM.render(
document.getElementById("root"),
);
// TODO: Remove this workaround when we get rid of material-ui-color and update to React 19+.
/**
* With built-in MUI components, we usually customize the zIndex via styleOverrides in src\Themes\ui\Theme.tsx. However,
* material-ui-color uses a prefix for all class names; for example, instead of "MuiPopover-root", it's
* "ColorPicker-MuiPopover-root". This library does not provide good ways to customize its components extensively, so we
* have to find a hacky way to work around this problem.
*/
const styleElement = document.createElement("style");
styleElement.textContent = `#color-popover {
z-index: 20000 !important;
}`;
document.head.appendChild(styleElement);
setTimeout(newRemoteFileApiConnection, 2000);
function rerender(): void {