mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
fix: color picker keyboard handling not working (#6464)
This commit is contained in:
parent
d34cd3072f
commit
034113772d
1 changed files with 7 additions and 1 deletions
|
@ -36,7 +36,13 @@ export const Popover = ({
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// focus popover only if the caller didn't focus on something else nested
|
||||||
|
// within the popover, which should take precedence. Fixes cases
|
||||||
|
// like color picker listening to keydown events on containers nested
|
||||||
|
// in the popover.
|
||||||
|
if (!container.contains(document.activeElement)) {
|
||||||
container.focus();
|
container.focus();
|
||||||
|
}
|
||||||
|
|
||||||
const handleKeyDown = (event: KeyboardEvent) => {
|
const handleKeyDown = (event: KeyboardEvent) => {
|
||||||
if (event.key === KEYS.TAB) {
|
if (event.key === KEYS.TAB) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue