Skip to content

Safari: First character after Caps Lock and long-press auto-repeat are dropped in xterm.js #5499

@longshuaige

Description

@longshuaige

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions