Skip to content

Commit

Permalink
Merge pull request #22107 from hoangzinh/df/21526
Browse files Browse the repository at this point in the history
Fix app refocuses on compose box even when RHN is open if we right click on emoji reaction and click on user
  • Loading branch information
madmax330 authored Jul 4, 2023
2 parents 4eef8fe + fba2e7e commit b2556be
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/components/Reactions/EmojiReactionBubble.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,15 @@ function EmojiReactionBubble(props) {
onSecondaryInteraction={props.onReactionListOpen}
ref={props.forwardedRef}
enableLongPressWithHover={props.isSmallScreenWidth}
// Prevent text input blur when emoji reaction is clicked
onMouseDown={(e) => e.preventDefault()}
onMouseDown={(e) => {
// Allow text input blur when emoji reaction is right clicked
if (e && e.button === 2) {
return;
}

// Prevent text input blur when emoji reaction is left clicked
e.preventDefault();
}}
accessibilityRole={CONST.ACCESSIBILITY_ROLE.BUTTON}
accessibilityLabel={props.emojiCodes.join('')}
>
Expand Down

0 comments on commit b2556be

Please sign in to comment.