Skip to content

Commit f342ff1

Browse files
authored
Merge pull request Expensify#67459 from FitseTLT/fix-flickering-issue-on-edit-expense-context-menu
Fix - mWeb/Chrome - Report - Page flickers and freezes when tapping on "Edit Expense" on track expense.
2 parents 9874e84 + 0997f51 commit f342ff1

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

src/pages/home/report/ContextMenu/ContextMenuActions.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -338,10 +338,16 @@ const ContextMenuActions: ContextMenuAction[] = [
338338
type === CONST.CONTEXT_MENU_TYPES.REPORT_ACTION && (canEditReportAction(reportAction) || canEditReportAction(moneyRequestAction)) && !isArchivedRoom && !isChronosReport,
339339
onPress: (closePopover, {reportID, reportAction, draftMessage, moneyRequestAction}) => {
340340
if (isMoneyRequestAction(reportAction) || isMoneyRequestAction(moneyRequestAction)) {
341-
hideContextMenu(false);
342-
const childReportID = reportAction?.childReportID;
343-
openReport(childReportID);
344-
Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(childReportID));
341+
const editExpense = () => {
342+
const childReportID = reportAction?.childReportID;
343+
openReport(childReportID);
344+
Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(childReportID));
345+
};
346+
if (closePopover) {
347+
hideContextMenu(false, editExpense);
348+
return;
349+
}
350+
editExpense();
345351
return;
346352
}
347353
const editAction = () => {

0 commit comments

Comments
 (0)