close open chat on esc #25

Closed
opened 2026-10-17 21:05:35 +00:00 by tlasol · 1 comment
Member

there’s no way to close an open chat from the keyboard. in other messengers (telegram, whatsapp desktop) esc closes the current chat and leaves an empty placeholder on the right

the placeholder matters: some users close chats for privacy, so nobody can glance more than the roster, so this is an expected behaviour

expected:

  • with a chat open, pressing esc closes it
  • the right side shows the same empty state as the start screen
  • no chat is highlighted in the roster

actual:

  • esc does nothing, the chat stays open

notes:

  • if something is open on top of the chat (reply, search, popup, file preview), esc closes that first and the chat only on the next press
  • a draft in the input field should be kept after closing
there’s no way to close an open chat from the keyboard. in other messengers (telegram, whatsapp desktop) esc closes the current chat and leaves an empty placeholder on the right the placeholder matters: some users close chats for privacy, so nobody can glance more than the roster, so this is an expected behaviour expected: - with a chat open, pressing esc closes it - the right side shows the same empty state as the start screen - no chat is highlighted in the roster actual: - esc does nothing, the chat stays open notes: - if something is open on top of the chat (reply, search, popup, file preview), esc closes that first and the chat only on the next press - a draft in the input field should be kept after closing
ann referenced this issue from a commit 2026-10-18 10:26:07 +00:00
Esc closes the open chat (#25: "close open chat on esc"): the right side goes back to the start screen's empty pane and no row in the list is picked. It is the last of the window's Escape shortcuts (chat-actions.ts, after the one that leaves selection mode), so every Esc consumer that is already there keeps the key first: the overlays' document listener closes the menu, the dialog, the certificate question, the topmost sheet (Settings, the in-window XML console, the media viewer) and the shell's lower layers (the details panel, the add-account sheet) and marks the key handled, the fields that keep their own Esc stop it (the composer's banner and tray, the search bar, the list filters, the voice recorder), and the app lock still holds every shortcut back. The new handler then steps through what belongs to the chat itself before the chat: its search bar when open but not focused, a thread pane, an edit (the stashed words come back) or a reply waiting in the field, and only then Store.closeChat, the same path the phone's pane switch and Android's back gesture take, whose doc comment now names Esc. The draft stays in Drafts and draft-sync publishes it on the change of openChat exactly as on a switch to another chat; a key still composing in an input method is left alone. esc-close-chat.test.ts boots the shell on the mock and checks the empty pane and the cleared selection, the draft kept and sent through chatDraft, a menu, a sheet, the search bar, a reply and an edit each taking the first press, and a key already handled elsewhere left alone. The changelog's Unreleased section gets a Changed entry.
Owner

Esc closes the open chat and leaves the empty pane, with no chat highlighted. Anything open over the chat closes first, one per press: a menu, dialog, sheet, search bar, thread, reply or edit. The draft is kept.

Fixed in 0.6.1: https://dev.another.im/another-im/anotherim-js/releases/tag/v0.6.1

Esc closes the open chat and leaves the empty pane, with no chat highlighted. Anything open over the chat closes first, one per press: a menu, dialog, sheet, search bar, thread, reply or edit. The draft is kept. Fixed in 0.6.1: https://dev.another.im/another-im/anotherim-js/releases/tag/v0.6.1
ann closed this issue 2026-10-18 10:35:24 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
another-im/anotherim-js#25
No description provided.