style/quick edit dialog: ignore monochromatic custom colors

This commit is contained in:
Adorian Doran 2025-10-23 10:44:23 +03:00
parent b58f37cd4a
commit 535b960b76

View File

@ -120,11 +120,17 @@ export default class PopupEditorDialog extends Container<BasicWidget> {
const wrapperElement = this.$wrapper.get(0)!;
if (colorClass) {
wrapperElement.className = "quick-edit-dialog-wrapper tinted-dialog " + colorClass;
wrapperElement.className = "quick-edit-dialog-wrapper " + colorClass;
} else {
wrapperElement.className = "quick-edit-dialog-wrapper";
}
const customHue = getComputedStyle(wrapperElement).getPropertyValue("--custom-color-hue");
if (customHue) {
/* Apply the tinted-dialog class only if the custom color CSS class specifies a hue */
wrapperElement.classList.add("tinted-dialog");
}
const activeEl = document.activeElement;
if (activeEl && "blur" in activeEl) {
(activeEl as HTMLElement).blur();