Typing while the emoji picker is up should enter search mode
This commit is contained in:
parent
e9f4e28b3d
commit
a52bb25731
4 changed files with 65 additions and 30 deletions
|
@ -54,7 +54,7 @@ export const ReactionPicker = React.forwardRef<HTMLDivElement, Props>(
|
|||
// Handle escape key
|
||||
React.useEffect(() => {
|
||||
const handler = (e: KeyboardEvent) => {
|
||||
if (onClose && e.key === 'Escape') {
|
||||
if (onClose && e.key === 'Escape' && !pickingOther) {
|
||||
onClose();
|
||||
}
|
||||
};
|
||||
|
@ -64,7 +64,7 @@ export const ReactionPicker = React.forwardRef<HTMLDivElement, Props>(
|
|||
return () => {
|
||||
document.removeEventListener('keydown', handler);
|
||||
};
|
||||
}, [onClose]);
|
||||
}, [onClose, pickingOther]);
|
||||
|
||||
// Handle EmojiPicker::onPickEmoji
|
||||
const onPickEmoji: EmojiPickerProps['onPickEmoji'] = React.useCallback(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue