From 8333870c8265e826a46e1a4e29fe3a055173f059 Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Thu, 29 Oct 2026 19:01:36 +0100 Subject: [PATCH] fix: keep a click on a message row from costing an extra render --- components/email/thread-list-item.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/components/email/thread-list-item.tsx b/components/email/thread-list-item.tsx index b2a8fddd1..7a70e0b30 100644 --- a/components/email/thread-list-item.tsx +++ b/components/email/thread-list-item.tsx @@ -565,7 +565,9 @@ const SingleEmailItem = React.forwardRef( {...touchHandlers} data-testid="email-list-item" onPointerOver={armHoverActions} - onFocus={armHoverActions} + // The row itself takes focus on click and from the keyboard; its actions + // come from Shift+F10 there, so only a control inside it arms them. + onFocus={(e) => { if (e.target !== e.currentTarget) armHoverActions(); }} onPointerDown={(e) => { if (onPrefetch && isMousePressOnRow(e)) onPrefetch(); }} data-email-id={email.id} data-subject={email.subject || ''} @@ -1266,7 +1268,9 @@ export const ThreadListItem = React.forwardRef { if (e.target !== e.currentTarget) armHoverActions(); }} onPointerDown={(e) => { if (onPrefetch && isMousePressOnRow(e)) onPrefetch(latestEmail); }} {...rowA11yProps({ rowKey: emailKeyFor(latestEmail),