coder / coder/ghostty-web

Bug: New terminal instances steal away focus

Open
#100 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2.8k
Forks
172
PR merge metrics
No merged PRs in 30d

Description

It seems that when creating a new ghostty-web terminal instance, and calling `.open()` on it, it automatically steals focus away into it, via using `setTimeout(() => ... this.element?.focus(), 0)`.

Need to at least make this configurable via a boolean prop like `autoFocus: boolean` and probably off by default, as it is causing unexpected issues for lib consumers.

For example, in order to regain focus on my app, I have to manually call `setTimeout(() => ... myStuff.focus(), 0)` after the new terminal instance initializes.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.