Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/components/BaseMiniContextMenuItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ function BaseMiniContextMenuItem(props) {
return;
}

// Allow text input blur on right click
if (!e || e.button === 2) {
return;
}

// Prevent text input blur on left click
e.preventDefault();
}}
accessibilityLabel={props.tooltipText}
Expand Down
5 changes: 3 additions & 2 deletions src/components/LHNOptionsList/OptionRowLHN.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,12 @@ function OptionRowLHN(props) {
props.onSelectRow(optionItem, popoverAnchor);
}}
onMouseDown={(e) => {
if (!e) {
// Allow composer blur on right click
if (!e || e.button === 2) {
return;
}

// Prevent losing Composer focus
// Prevent composer blur on left click
e.preventDefault();
}}
onSecondaryInteraction={(e) => showPopover(e)}
Expand Down
11 changes: 9 additions & 2 deletions src/components/Reactions/AddReactionBubble.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,15 @@ function AddReactionBubble(props) {
ref={ref}
style={({hovered, pressed}) => [styles.emojiReactionBubble, styles.userSelectNone, StyleUtils.getEmojiReactionBubbleStyle(hovered || pressed, false, props.isContextMenu)]}
onPress={Session.checkIfActionIsAllowed(onPress)}
// Prevent text input blur when Add reaction is clicked
onMouseDown={(e) => e.preventDefault()}
onMouseDown={(e) => {
// Allow text input blur when Add reaction is right clicked
if (!e || e.button === 2) {
return;
}

// Prevent text input blur when Add reaction is left clicked
e.preventDefault();
}}
accessibilityLabel={props.translate('emojiReactions.addReactionTooltip')}
accessibilityRole={CONST.ACCESSIBILITY_ROLE.BUTTON}
// disable dimming
Expand Down