Keep filament color choices open until the click completes
This commit is contained in:
1 parent
65957e1c3f
commit
0891448546
1 file changed
+4
-3
@@ -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 });
|
||||
|
||||
Reference in new issue
Block a user