mirror of
https://github.com/nesquena/hermes-webui.git
synced 2026-05-25 19:20:16 +00:00
32df5546b4
When tool approval or clarification cards appear during streaming, they unconditionally call focus() on their input elements via setTimeout, stealing focus from the composer (#msg) if the user is actively typing. This silently drops keystrokes mid-type. Add a guard: only move focus to the card if the composer textarea does not already have focus. The document.activeElement check matches the pattern already used upstream in other focus-sensitive components. Fixes: #