From feb1be3d142ad5008b7c972c481658c1b47a0174 Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Wed, 6 May 2026 21:51:40 -0700 Subject: [PATCH] fix(dashboard): block composer drag-pan via onTouchMove preventDefault MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit touch-action: manipulation is needed on the textarea so iOS registers first-tap focus reliably, but it also allows pan-y — which let the user drag the input box up off-screen with the keyboard up. Cancelling touchmove blocks the drag without affecting tap (a tap fires touchstart + touchend with no touchmove in between), so the composer stays locked AND first-tap focus works. Co-Authored-By: Claude Opus 4.7 (1M context) --- packages/dashboard/app/components/ChatView.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/dashboard/app/components/ChatView.tsx b/packages/dashboard/app/components/ChatView.tsx index a944fab0e..0ed0b7b0b 100644 --- a/packages/dashboard/app/components/ChatView.tsx +++ b/packages/dashboard/app/components/ChatView.tsx @@ -1948,6 +1948,16 @@ export function ChatView({ projectId, addToast }: ChatViewProps) { event.preventDefault(); event.currentTarget.focus({ preventScroll: true }); }} + onTouchMove={(event) => { + // Lock the composer in place. touch-action: manipulation + // is required for first-tap focus to register on iOS, + // but it also permits pan-y, which lets the user drag + // the input box up off-screen. Cancelling touchmove + // blocks the drag without affecting tap (a tap fires + // touchstart + touchend with no touchmove in between). + if (typeof window === "undefined" || window.innerWidth > 768) return; + event.preventDefault(); + }} rows={1} data-testid="chat-input" />