[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
This commit is contained in:
Stephen Brown II
2026-04-21 11:04:17 -05:00
committed by GitHub
parent 3e35d3b6f5
commit 880bb67423
2 changed files with 15 additions and 1 deletions

View File

@@ -1215,10 +1215,18 @@ const Transaction = memo(function Transaction({
? siblingCount <= 1
: prevRowDate !== transaction.date && nextRowDate !== transaction.date;
const previewRef = useRef<DragPreviewRenderer>(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<TransactionEntity>({
item: originalTransaction,
type: 'transaction',
canDrag: canDrag && !isPreview && !isOnlyTransactionOnDate,
canDrag: allowRowDrag,
onDragChange,
preview: previewRef,
});

View File

@@ -0,0 +1,6 @@
---
category: Bugfixes
authors: [StephenBrown2]
---
Fix transaction row drag interfering with inline text edits.