Mail · a focused star keeps Space and Enter; so does Unpin

A button in a SelectableList row now stops Space and Enter at its box
on key down, so the list no longer toggles its selection before the
button acts. The mail star and the pinned messages' Unpin, which had
the same fault, both do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-09-26 23:45:22 -04:00
1 parent b6b1224c27
commit 0a281d91ab
5 files changed
+38 -1

No files matched your search

+8
View File
@@ -166,6 +166,14 @@ impl MailItem {
window.prevent_default();
cx.stop_propagation();
})
.on_key_down(|event, _, cx| {
let key = event.keystroke.key.as_str();
if matches!(key, "space" | "enter")
&& !event.keystroke.modifiers.modified()
{
cx.stop_propagation();
}
})
.on_click(move |_, window, cx| {
log::info!("mail {key}: star {}", !starred);
set(!starred, window, cx)