diff --git a/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.tsx b/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.tsx index 50b424fc736b..5cfce625201e 100644 --- a/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.tsx +++ b/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.tsx @@ -242,7 +242,6 @@ function PopoverReportActionContextMenu(_props: unknown, ref: ForwardedRef { - contextMenuRef.current?.showContextMenu( - type, - event, - selection, - contextMenuAnchor, - reportID, - reportActionID, - originalReportID, - draftMessage, - onShow, - onHide, - isArchivedRoom, - isChronosReport, - isPinnedChat, - isUnreadChat, - disabledActions, - shouldCloseOnTarget, - setIsEmojiPickerActive, - isOverflowMenu, - ); - }; - // If there is an already open context menu, close it first before opening // a new one. if (contextMenuRef.current.instanceID) { - hideContextMenu(false, show); - return; + hideContextMenu(); + contextMenuRef.current.runAndResetOnPopoverHide(); } - show(); + contextMenuRef.current.showContextMenu( + type, + event, + selection, + contextMenuAnchor, + reportID, + reportActionID, + originalReportID, + draftMessage, + onShow, + onHide, + isArchivedRoom, + isChronosReport, + isPinnedChat, + isUnreadChat, + disabledActions, + shouldCloseOnTarget, + setIsEmojiPickerActive, + isOverflowMenu, + ); } /**