From 880bb6742330a554eafd880fc29f4f8afc2ee18e Mon Sep 17 00:00:00 2001 From: Stephen Brown II Date: Tue, 21 Apr 2026 11:04:17 -0500 Subject: [PATCH] [AI] Fix transaction row drag breaking inline text edits (#7572) * [AI] fix: disable transaction row drag while editing input cells Row-level useDrag competed with notes/payee/amount fields (GH #7567). Disable reorder drag when the row is in edit mode except for select/cleared columns. * Add release notes --- .../src/components/transactions/TransactionsTable.tsx | 10 +++++++++- upcoming-release-notes/7572.md | 6 ++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 upcoming-release-notes/7572.md diff --git a/packages/desktop-client/src/components/transactions/TransactionsTable.tsx b/packages/desktop-client/src/components/transactions/TransactionsTable.tsx index aa7f94cfb0..2e80273952 100644 --- a/packages/desktop-client/src/components/transactions/TransactionsTable.tsx +++ b/packages/desktop-client/src/components/transactions/TransactionsTable.tsx @@ -1215,10 +1215,18 @@ const Transaction = memo(function Transaction({ ? siblingCount <= 1 : prevRowDate !== transaction.date && nextRowDate !== transaction.date; const previewRef = useRef(null); + // Row-level drag must not compete with inline editors (notes, amounts, + // payee, etc.): otherwise clicks/drags inside inputs start a reorder drag + // instead of moving the caret or selecting text (see GH #7567). + const allowRowDrag = + canDrag && + !isPreview && + !isOnlyTransactionOnDate && + (!editing || focusedField === 'select' || focusedField === 'cleared'); const { dragRef, dragProps } = useDrag({ item: originalTransaction, type: 'transaction', - canDrag: canDrag && !isPreview && !isOnlyTransactionOnDate, + canDrag: allowRowDrag, onDragChange, preview: previewRef, }); diff --git a/upcoming-release-notes/7572.md b/upcoming-release-notes/7572.md new file mode 100644 index 0000000000..bc8f816bd2 --- /dev/null +++ b/upcoming-release-notes/7572.md @@ -0,0 +1,6 @@ +--- +category: Bugfixes +authors: [StephenBrown2] +--- + +Fix transaction row drag interfering with inline text edits.