Files
Codeman/.changeset
Codeman maintainer 79f85415d8 fix(web): a dialog opened with the mouse hands the keyboard back to the terminal
After App Settings or Session Options was opened with a mouse click and
closed, nothing typed reached the terminal until it was clicked again.
FocusTrap saved document.activeElement when the dialog opened, and by then
the press had already moved focus: onto the pressed control in Chromium and
Firefox, onto <body> in WebKit on macOS, where a button takes no focus from
the mouse.

FocusTrap.focusToReturn() is what a dialog saves now. A pointerdown listener
records the typing field that had focus when a mouse press began (pointerdown
comes before mousedown, whose default action moves focus), and that field is
the answer when focus sits on the pressed control or on <body> as the dialog
opens. Any key forgets the press, so a control reached with the keyboard gets
focus back as before. Only a typing field is remembered, for one press (a
press on a menu item inherits it from the press that opened the menu) and
only for a mouse, so touch is unchanged. Asking spends the press, so nothing
pressed inside the opening dialog can hand the keyboard to a field behind it.

The command palette and the Session Manager save the same answer.

Measured in Chromium against a running server: App Settings and Session
Options opened by mouse ended on the clicked gear before and in the terminal
after, also with the press clearing focus as WebKit on macOS does, with the
tile grid and the split open (the keyboard returns to the pane it was in),
and through a tile's menu. Not run in WebKit on macOS itself.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-25 10:23:52 +01:00
..
2026-02-27 10:58:10 +01:00
2026-02-27 10:58:10 +01:00

Changesets

Hello and welcome! This folder has been automatically generated by @changesets/cli, a build tool that works with multi-package repos, or single-package repos to help you version and publish your code. You can find the full documentation for it in the repository.

What is a changeset?

A changeset is a piece of information about changes made in a branch or commit. It holds three bits of information:

  • What packages need to be released
  • What semver bump type each package should receive (major / minor / patch)
  • A summary of the changes

How do I create a changeset?

Run npx changeset or create a .md file in this directory with the following format:

---
"codeman": patch
---

Description of changes

The frontmatter specifies which package(s) to bump and the bump type. The body is the changelog entry.