Skip to content

Fix/draft note focus transition - #1125

Merged
benvinegar merged 2 commits into
modem-dev:mainfrom
igshehata:fix/draft-note-focus-transition
Oct 11, 2026
Merged

benvinegar merged 2 commits into
modem-dev:mainfrom
igshehata:fix/draft-note-focus-transition

Conversation

@igshehata

Copy link
Copy Markdown
Contributor

Problem

I first noticed this in pi-hunk: typing immediately after opening an inline comment could trigger global shortcuts instead of entering text. Closing and reopening the editor appeared to resolve it.

Investigation traced the problem back to Hunk’s terminal input/focus handling, and it reproduces in standalone Hunk without pi-hunk.

There is a window between opening a draft and its editor mounting and receiving focus. Printable input arriving during that window can be handled as global shortcuts or lost. For example, sending csnote in one terminal input burst should open a draft containing snote; instead, it can
toggle the sidebar and open the theme selector.

Islam Shehata and others added 2 commits September 25, 2026 09:28
Typing that arrives in the same input chunk as the key or click that opens a note draft was dispatched as global commands: the editor takes keyboard ownership in a later render, so the characters never reached the note and unrelated commands ran instead. Buffer printable keys for the draft, deliver them when the editor takes focus, and honor Escape and Ctrl-S inside the same window.
@vercel

vercel Bot commented Sep 25, 2026

Copy link
Copy Markdown

@codex is attempting to deploy a commit to the Modem Team on Vercel.

A member of the Team first needs to authorize it.

@igshehata
igshehata marked this pull request as ready for review September 25, 2026 07:15
@greptile-apps

greptile-apps Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

PR author is not in the allowed authors list.

@benvinegar
benvinegar merged commit e5f4a05 into modem-dev:main Oct 11, 2026
13 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants