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
|
@ -35,6 +35,13 @@ export const ReactionPickerPickerEmojiButton = React.forwardRef<
|
|||
event.stopPropagation();
|
||||
onClick();
|
||||
}}
|
||||
onKeyDown={event => {
|
||||
if (event.key === 'Enter' || event.key === 'Space') {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
onClick();
|
||||
}
|
||||
}}
|
||||
>
|
||||
<Emoji size={48} emoji={emoji} title={title} />
|
||||
</button>
|
||||
|
@ -54,6 +61,13 @@ export const ReactionPickerPickerMoreButton = ({
|
|||
event.stopPropagation();
|
||||
onClick();
|
||||
}}
|
||||
onKeyDown={event => {
|
||||
if (event.key === 'Enter' || event.key === 'Space') {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
onClick();
|
||||
}
|
||||
}}
|
||||
tabIndex={0}
|
||||
title={i18n('Reactions--more')}
|
||||
type="button"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue