Fix autofocusing Emoji reaction picker search (#10599)
This commit is contained in:
@@ -68,7 +68,19 @@ function MenuInner({
|
||||
return expanded ? (
|
||||
<EmojiPicker.Picker keepOpenWhenShiftHeld={false} />
|
||||
) : (
|
||||
<Menu.Outer style={[a.rounded_full]}>
|
||||
<Menu.Outer
|
||||
style={[a.rounded_full]}
|
||||
onCloseAutoFocus={evt => {
|
||||
// If something has already taken focus (e.g. emoji-mart's search
|
||||
// input when swapping to the full picker), don't let Radix restore
|
||||
// focus to the trigger and steal it back.
|
||||
if (
|
||||
document.activeElement &&
|
||||
document.activeElement !== document.body
|
||||
) {
|
||||
evt.preventDefault()
|
||||
}
|
||||
}}>
|
||||
<View style={[a.flex_row, a.gap_xs]}>
|
||||
{['❤️', '👍', '😆', '👀', '😢'].map(emoji => {
|
||||
const alreadyReacted = hasAlreadyReacted(
|
||||
|
||||
@@ -217,6 +217,7 @@ let MessageItem = ({
|
||||
const avatar =
|
||||
profile && moderationOpts ? (
|
||||
<Link
|
||||
style={[a.rounded_full]}
|
||||
label={l`${createSanitizedDisplayName(profile)}’s avatar`}
|
||||
accessibilityHint={l`Opens this profile`}
|
||||
to={makeProfileLink({
|
||||
|
||||
Reference in New Issue
Block a user