From 7070dfe0471dfa60e862b9adb9946019b3bf6a5e Mon Sep 17 00:00:00 2001 From: DylanDylann Date: Wed, 20 Sep 2023 19:12:01 +0700 Subject: [PATCH] fix edge case clicking on current active emoji --- src/components/BaseMiniContextMenuItem.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/BaseMiniContextMenuItem.js b/src/components/BaseMiniContextMenuItem.js index 64a24f526f54..0e9085b54c17 100644 --- a/src/components/BaseMiniContextMenuItem.js +++ b/src/components/BaseMiniContextMenuItem.js @@ -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 = { /** @@ -56,6 +57,7 @@ function BaseMiniContextMenuItem(props) { onPress={props.onPress} onMouseDown={(e) => { if (!ReportActionComposeFocusManager.isFocused() && !ReportActionComposeFocusManager.isEditFocused()) { + DomUtils.getActiveElement().blur(); return; }