diff --git a/packages/dashboard/app/components/QuickEntryBox.tsx b/packages/dashboard/app/components/QuickEntryBox.tsx index 510250667a..62e6ff1bcf 100644 --- a/packages/dashboard/app/components/QuickEntryBox.tsx +++ b/packages/dashboard/app/components/QuickEntryBox.tsx @@ -104,6 +104,7 @@ export function QuickEntryBox({ onCreate, addToast, tasks = [], availableModels, const [isDisclosureExpanded, setIsDisclosureExpanded] = useState(true); const textareaRef = useRef(null); const fileInputRef = useRef(null); + const touchButtonRef = useRef(null); const justResetRef = useRef(false); const previousProjectIdRef = useRef(projectId); const [pendingImages, setPendingImages] = useState([]); @@ -1478,7 +1479,34 @@ export function QuickEntryBox({ onCreate, addToast, tasks = [], availableModels, > {/* All quick-create actions behind single disclosure toggle */} {showExpandedControls && !isSubmitting && ( -
+
{ + const target = e.target; + if (!(target instanceof HTMLElement)) return; + const button = target.closest("button"); + if (button && !button.disabled) { + e.preventDefault(); + touchButtonRef.current = button; + } + }} + onTouchEnd={() => { + const button = touchButtonRef.current; + touchButtonRef.current = null; + if (button && !button.disabled) { + button.click(); + window.setTimeout(() => { + window.setTimeout(() => { + textareaRef.current?.focus({ preventScroll: true }); + }, 0); + }, 0); + } + }} + onTouchCancel={() => { + touchButtonRef.current = null; + }} + >