Keep filament color choices open until the click completes

This commit is contained in:
Mikei386 committed 2026-11-18 17:55:52 +01:00
1 parent 65957e1c3f
commit 0891448546
1 file changed
+4 -3
+4 -3
View File
@@ -131,9 +131,10 @@ function enhanceColorSelect(select, signal) {
buttons[key === "Home" ? 0 : buttons.length - 1].focus();
}
});
picker.addEventListener("focusout", (event) => {
if (!picker.contains(event.relatedTarget)) close();
});
// The pressed option may not receive focus before its click is dispatched.
document.addEventListener("focusin", (event) => {
if (!picker.contains(event.target)) close();
}, { signal });
document.addEventListener("pointerdown", (event) => {
if (!picker.contains(event.target)) close();
}, { signal });