Skip to content

Commit 5a78389

Browse files
fix(mobile): guard editing and sending during task navigation
1 parent 504c35d commit 5a78389

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎apps/mobile/src/features/threads/NewTaskDraftScreen.tsx‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1211,6 +1211,7 @@ export function NewTaskDraftScreen(props: {
12111211
);
12121212

12131213
async function handleStart(): Promise<void> {
1214+
if (submitNavigationAction !== null) return;
12141215
if (voiceInput.blocksSubmission || pendingPastedTextAttachmentCountRef.current > 0) return;
12151216
const selectedProject = flow.selectedProject;
12161217
const draftKey = flow.draftKey;
@@ -1390,6 +1391,7 @@ export function NewTaskDraftScreen(props: {
13901391
isIncomingShareReady &&
13911392
!isImportingShare &&
13921393
!flow.submitting &&
1394+
submitNavigationAction === null &&
13931395
pendingPastedTextAttachmentCount === 0 &&
13941396
!voiceInput.blocksSubmission &&
13951397
!(flow.workspaceMode === "worktree" && !flow.selectedBranchName);
@@ -1435,7 +1437,9 @@ export function NewTaskDraftScreen(props: {
14351437
// Focusing is a user action, so presenting the form sheet has one motion.
14361438
autoFocus={false}
14371439
// Clipboard imports use the editor's read-only mode to retain keyboard focus.
1438-
editable={!isIncomingShareTransferPending && !flow.submitting}
1440+
editable={
1441+
!isIncomingShareTransferPending && !flow.submitting && submitNavigationAction === null
1442+
}
14391443
readOnly={voiceInput.freezesEditor}
14401444
multiline
14411445
scrollEnabled

0 commit comments

Comments
 (0)