From 0bf59fb0b188a16c19140c1a1ce6bd6b939d7318 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Tue, 12 Nov 2024 12:24:03 +0800 Subject: [PATCH] check if the children has composer or not instead --- src/components/FlatList/index.tsx | 3 ++- src/pages/home/report/ReportActionItem.tsx | 5 +---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/components/FlatList/index.tsx b/src/components/FlatList/index.tsx index 0000429c6a77..fb5abd254d77 100644 --- a/src/components/FlatList/index.tsx +++ b/src/components/FlatList/index.tsx @@ -154,8 +154,9 @@ function MVCPFlatList({maintainVisibleContentPosition, horizontal = false } firstVisibleViewRef.current = null; }); + console.log('mutation added', mutation.addedNodes) mutation.addedNodes.forEach((node) => { - if (node.nodeType !== Node.ELEMENT_NODE || (node as HTMLElement).dataset.isEditing !== 'true') { + if (node.nodeType !== Node.ELEMENT_NODE || !(node as HTMLElement).querySelector('#composer')) { return; } isEditComposerAdded = true; diff --git a/src/pages/home/report/ReportActionItem.tsx b/src/pages/home/report/ReportActionItem.tsx index ce49757a1e60..2953036f6af7 100644 --- a/src/pages/home/report/ReportActionItem.tsx +++ b/src/pages/home/report/ReportActionItem.tsx @@ -957,10 +957,7 @@ function ReportActionItem({ shouldFreezeCapture={isPaymentMethodPopoverActive} > {(hovered) => ( - + {shouldDisplayNewMarker && (!shouldUseThreadDividerLine || !isFirstVisibleReportAction) && } {shouldDisplayContextMenu && (