Stefan Walcz
49f0a30df2
fix(ui): keep focus in settings sheets when the page re-renders
...
The chat settings sheet, the Talk session sheet and the agent and task
preview sheets set up their focus handling in an effect that depended on
onClose. Every parent passes onClose as an inline arrow, so each re-render
of the page gave it a new identity: the effect cleanup sent focus back to
the opener and the effect ran again and focused the Close button.
Any edit in a sheet re-renders the page, so focus left the control being
used. In the chat sheet, typing in the system prompt moved focus to Close
after the first key, and a following space activated Close and dismissed
the sheet; an open native dropdown in the sheet closed by itself.
Keep the latest onClose in a ref and run the focus effect once per open.
Escape still calls the current onClose; initial focus on Close, the Tab
trap and restoring focus to the opener are unchanged.
The e2e specs type key by key (or switch preview tabs) and assert that
focus stays put; they fail without this change.
Docs-Not-Needed: bug fix, no user-facing behaviour change beyond the fix
Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Stefan Walcz <stefan.walcz@walcz.de >
(cherry picked from commit 773cae7259 )
2026-10-25 09:21:58 +00:00
..
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-22 17:57:19 +02:00
2026-10-24 14:29:39 +02:00
2026-10-24 15:56:39 +02:00
2026-10-24 22:46:09 +02:00
2026-10-23 15:25:37 +02:00
2026-10-23 15:25:37 +02:00
2026-10-22 17:57:19 +02:00
2026-10-23 15:25:37 +02:00
2026-10-22 17:57:19 +02:00
2026-10-23 12:35:44 +02:00
2026-10-22 17:57:19 +02:00
2026-10-23 15:25:37 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-25 09:21:58 +00:00
2026-10-08 22:03:07 +02:00
2026-10-25 09:21:58 +00:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-08-16 11:57:31 +02:00
2026-10-22 17:57:19 +02:00
2026-10-08 22:03:07 +02:00
2026-10-22 14:08:24 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-22 17:57:19 +02:00
2026-10-22 14:08:24 +02:00
2026-10-23 15:25:37 +02:00
2026-10-08 22:03:07 +02:00
2026-10-15 15:38:30 +02:00
2026-10-18 21:52:59 +02:00
2026-10-08 22:03:07 +02:00
2026-10-22 17:57:19 +02:00
2026-10-22 17:57:19 +02:00
2026-10-10 08:30:02 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-22 17:57:19 +02:00
2026-10-08 22:03:07 +02:00
2026-10-15 15:38:30 +02:00
2026-10-25 09:21:58 +00:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-23 11:54:53 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-05-28 13:43:15 +02:00
2026-10-08 22:03:07 +02:00
2026-10-24 10:05:30 +02:00
2026-10-13 08:27:24 +00:00
2026-10-22 17:57:19 +02:00
2026-10-08 22:03:07 +02:00
2026-09-27 07:42:21 +00:00
2026-09-27 07:42:21 +00:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-22 17:57:19 +02:00
2026-10-22 17:57:19 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-22 17:57:19 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-10 08:29:48 +02:00
2026-10-10 08:29:48 +02:00
2026-10-08 22:03:07 +02:00
2026-08-11 12:00:59 +02:00
2026-08-11 12:00:59 +02:00
2026-08-11 12:00:59 +02:00
2026-08-11 12:00:59 +02:00
2026-08-11 12:00:59 +02:00
2026-08-16 11:57:31 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-22 17:57:19 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-23 01:00:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-05-26 22:06:10 +02:00
2026-10-19 23:43:47 +02:00
2026-10-22 17:57:19 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-07-28 19:33:48 +02:00
2026-06-22 18:26:19 +02:00
2026-08-16 11:57:31 +02:00
2026-10-10 08:30:02 +02:00
2026-10-08 22:03:07 +02:00
2026-10-10 08:30:02 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-25 09:10:47 +01:00
2026-10-23 11:54:53 +02:00
2026-10-08 22:03:07 +02:00
2026-10-22 17:57:19 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-24 22:46:09 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-22 17:57:19 +02:00
2026-10-23 11:54:53 +02:00
2026-10-08 22:03:07 +02:00
2026-07-28 19:33:48 +02:00
2026-09-11 16:54:56 +02:00
2026-10-04 09:34:21 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-23 01:00:07 +02:00
2026-10-23 12:27:29 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-20 18:08:37 +02:00
2026-08-19 08:45:59 +02:00
2026-10-24 22:46:09 +02:00
2026-10-24 22:46:09 +02:00
2026-10-22 17:57:19 +02:00
2026-10-22 17:57:19 +02:00
2026-10-22 17:57:19 +02:00
2026-10-22 17:57:19 +02:00
2026-10-23 12:35:44 +02:00
2026-10-10 08:30:02 +02:00
2026-10-22 17:57:19 +02:00
2026-10-23 12:35:44 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-22 17:57:19 +02:00
2026-10-22 17:57:19 +02:00
2026-10-23 12:35:44 +02:00
2026-10-25 09:21:58 +00:00
2026-10-08 22:03:07 +02:00
2026-08-03 00:16:08 +02:00
2026-10-22 17:57:19 +02:00
2026-10-22 17:57:19 +02:00
2026-10-08 22:03:07 +02:00
2026-07-22 22:51:25 +02:00
2026-07-22 22:51:25 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-10 08:30:02 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-10-08 22:03:07 +02:00
2026-05-28 13:43:15 +02:00