enable ColorPicker keyboard shortcuts if using custom color (#2288)

This commit is contained in:
Andrew Aquino 2020-10-27 03:01:57 -07:00 committed by GitHub
parent f404ab6f50
commit 5e55e77f54
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View file

@ -65,6 +65,8 @@ const Picker = ({
activeItem.current.focus();
} else if (colorInput.current) {
colorInput.current.focus();
} else if (gallery.current) {
gallery.current.focus();
}
}, []);
@ -140,6 +142,7 @@ const Picker = ({
gallery.current = el;
}
}}
tabIndex={0}
>
{colors.map((_color, i) => (
<button