Skip to content

Commit

Permalink
fix edge case clicking on current active emoji
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanDylann committed Sep 20, 2023
1 parent 4f88426 commit 7070dfe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/BaseMiniContextMenuItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import variables from '../styles/variables';
import Tooltip from './Tooltip';
import PressableWithoutFeedback from './Pressable/PressableWithoutFeedback';
import ReportActionComposeFocusManager from '../libs/ReportActionComposeFocusManager';
import DomUtils from '../libs/DomUtils';

const propTypes = {
/**
Expand Down Expand Up @@ -56,6 +57,7 @@ function BaseMiniContextMenuItem(props) {
onPress={props.onPress}
onMouseDown={(e) => {
if (!ReportActionComposeFocusManager.isFocused() && !ReportActionComposeFocusManager.isEditFocused()) {
DomUtils.getActiveElement().blur();
return;
}

Expand Down

0 comments on commit 7070dfe

Please sign in to comment.