enable ColorPicker keyboard shortcuts if using custom color (#2288)
This commit is contained in:
parent
f404ab6f50
commit
5e55e77f54
@ -51,6 +51,12 @@
|
|||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(5, auto);
|
grid-template-columns: repeat(5, auto);
|
||||||
grid-gap: 0.5rem;
|
grid-gap: 0.5rem;
|
||||||
|
border-radius: 4px;
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
outline: none;
|
||||||
|
box-shadow: 0 0 0 2px var(--focus-highlight-color);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.color-picker-content .color-input-container {
|
.color-picker-content .color-input-container {
|
||||||
|
@ -65,6 +65,8 @@ const Picker = ({
|
|||||||
activeItem.current.focus();
|
activeItem.current.focus();
|
||||||
} else if (colorInput.current) {
|
} else if (colorInput.current) {
|
||||||
colorInput.current.focus();
|
colorInput.current.focus();
|
||||||
|
} else if (gallery.current) {
|
||||||
|
gallery.current.focus();
|
||||||
}
|
}
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
@ -140,6 +142,7 @@ const Picker = ({
|
|||||||
gallery.current = el;
|
gallery.current = el;
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
tabIndex={0}
|
||||||
>
|
>
|
||||||
{colors.map((_color, i) => (
|
{colors.map((_color, i) => (
|
||||||
<button
|
<button
|
||||||
|
Loading…
x
Reference in New Issue
Block a user