Details
When running xterm.js inside a React app on Safari (macOS), toggling Caps Lock or long-pressing any printable key causes the first character (or repeated characters) to be swallowed. Native <textarea> elements on the same page keep working, so the regression is specific to xterm’s hidden textarea + input pipeline.
Steps to reproduce
Click inside the terminal to focus it.
Press Caps Lock, then type any letter once.
Long-press a letter key (e.g., “a”) to trigger Safari’s auto-repeat.
Environment
xterm.js: 5.5.0 (@xterm/[email protected])
Browser: Safari 17.2 on macOS Sonoma 14.2 (also reproducible on Safari 16.x / macOS Ventura)
Framework: React 18 + Vite (see src/App.jsx in the attached sample repo)