[BUG] Preview pane auto-refresh steals keyboard focus from chat input while typing (Windows desktop)

Resolved 💬 0 comments Opened Jun 9, 2026 by cloverink Closed Jun 9, 2026

Summary

On the Claude Code desktop app (Windows), when a preview pane / preview server is open and auto-refreshes, keyboard focus is pulled out of the chat input. While typing a message, focus is lost mid-sentence and I have to click back into the chat input box with the mouse — over and over. Composing any message while a preview is open becomes very disruptive.

Environment

  • OS: Windows 11 Pro (10.0.26200)
  • Claude Code version: 2.1.148
  • Surface: Desktop app (Windows)
  • Project workspace: opened over WSL (Ubuntu 24.04). Dev server runs inside WSL (Vite + React, HMR enabled); the preview pane points at that dev server.

Steps to reproduce

  1. Open a project with a running dev server and keep the preview pane open (e.g. a Vite + React app with HMR).
  2. Trigger anything that makes the preview reload/refresh (an HMR update, a navigation, or a periodic refresh).
  3. Start typing a message in the chat input.
  4. While the preview refreshes, watch the chat input.

Expected

Keyboard focus stays in the chat input regardless of preview-pane refresh/reload. Typing is never interrupted.

Actual

When the preview refreshes, focus is yanked away from the chat input. Subsequent keystrokes don't land in the input — I have to click back into the chat box with the mouse to keep typing. This repeats on every preview refresh.

Possibly related (all currently CLOSED)

These look like the same family of Windows focus-stealing problems, but none matches this exact symptom (a preview refresh pulling focus out of the chat input mid-typing), so filing separately:

  • #53475 — preview pane visibilityState interaction with chat-pane focus
  • #56663 — Cowork chat input not focusable on Windows
  • #39558 — extension steals focus / hijacks keyboard input during tasks

Impact

Composing any non-trivial message while a preview is open requires constant mouse re-focusing — it directly undermines the type-while-iterating workflow the preview feature is meant to support.

View original on GitHub ↗