Fix keyboard handling in ReactionPicker/Viewer and their child views
This commit is contained in:
parent
0bf77fadd3
commit
03b750d072
7 changed files with 162 additions and 72 deletions
|
@ -4,7 +4,7 @@
|
|||
import * as React from 'react';
|
||||
import { convertShortName } from '../emoji/lib';
|
||||
import type { Props as EmojiPickerProps } from '../emoji/EmojiPicker';
|
||||
import { useRestoreFocus } from '../../hooks/useRestoreFocus';
|
||||
import { useDelayedRestoreFocus } from '../../hooks/useRestoreFocus';
|
||||
import type { LocalizerType } from '../../types/Util';
|
||||
import {
|
||||
ReactionPickerPicker,
|
||||
|
@ -75,7 +75,7 @@ export const ReactionPicker = React.forwardRef<HTMLDivElement, Props>(
|
|||
);
|
||||
|
||||
// Focus first button and restore focus on unmount
|
||||
const [focusRef] = useRestoreFocus();
|
||||
const [focusRef] = useDelayedRestoreFocus();
|
||||
|
||||
if (pickingOther) {
|
||||
return renderEmojiPicker({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue