diff --git a/src/mobile-web/src/pages/ChatPage.tsx b/src/mobile-web/src/pages/ChatPage.tsx index 538fad9f0..312717ed1 100644 --- a/src/mobile-web/src/pages/ChatPage.tsx +++ b/src/mobile-web/src/pages/ChatPage.tsx @@ -2419,9 +2419,9 @@ const ChatPage: React.FC = ({ sessionMgr, sessionId, sessionName, useEffect(() => { const onKeyDown = (e: KeyboardEvent) => { if (e.key === 'Tab' && e.shiftKey) { - // Skip when the textarea is focused — its own React handler already fired. - const tag = (e.target as HTMLElement)?.tagName; - if (tag === 'TEXTAREA') return; + const target = e.target as HTMLElement; + const tag = target?.tagName; + if (tag === 'INPUT' || tag === 'TEXTAREA' || tag === 'SELECT' || target?.isContentEditable) return; e.preventDefault(); cycleAgentModeRef.current(); } diff --git a/src/web-ui/src/flow_chat/components/ChatInput.tsx b/src/web-ui/src/flow_chat/components/ChatInput.tsx index a03082bb6..19cad8b63 100644 --- a/src/web-ui/src/flow_chat/components/ChatInput.tsx +++ b/src/web-ui/src/flow_chat/components/ChatInput.tsx @@ -2057,7 +2057,6 @@ export const ChatInput: React.FC = ({ e.preventDefault(); e.stopPropagation(); - // Dismiss slash command if open if (slashCommandState.isActive) { setSlashCommandState({ isActive: false, kind: 'modes', query: '', selectedIndex: 0 }); dispatchInput({ type: 'CLEAR_VALUE' });