fkwp
a6e00895a0
Track the focus modality on the menu itself
...
- Was watched at the document, so a key pressed in another Element Call on the
same page — or in the host's own page — lit this menu's ring. Element Call
can be mounted more than once, and the menu is portalled out of the root.
- Watched on the menu instead, which is the element that holds focus.
- A callback ref, not an effect on `menuOpen`: that state is ours and the open
menu is Radix's, and they do not commit together, so the effect could run
before there was anything to attach to.
- Recorded on the menu rather than in state, so every item it can focus answers
to it — the camera menu's blur toggle kept the browser's own ring otherwise,
which follows the pointer.
- Nothing re-renders when the modality changes now, so the reset folds in with
the listeners and the second effect on that state goes.
- Comments moved to the code they describe; three unrelated ones had stacked up
on one declaration.
2026-09-17 11:56:31 +02:00
..
2026-07-08 17:06:09 +02:00
2026-03-30 18:26:38 +02:00
2026-09-03 11:47:35 +02:00
2026-09-02 15:04:24 +02:00
2026-09-08 15:39:00 +02:00
2026-09-17 11:56:31 +02:00
2026-09-09 10:23:47 +02:00
2026-09-03 11:47:35 +02:00
2025-06-23 23:06:33 -04:00
2026-08-18 17:30:12 +02:00
2026-09-07 14:50:36 +02:00
2026-09-02 13:03:23 +02:00
2026-03-30 18:26:38 +02:00
2026-07-09 12:28:39 +02:00
2026-09-10 21:27:11 +02:00
2024-12-09 22:09:16 +00:00
2025-03-13 18:00:24 -04:00
2026-07-08 17:06:09 +02:00
2026-09-16 17:44:55 +02:00
2026-09-08 20:05:27 +02:00
2025-09-16 11:46:25 +02:00
2026-09-17 11:56:25 +02:00
2026-06-08 00:49:43 -07:00
2026-09-01 18:54:27 +02:00
2026-09-17 11:56:25 +02:00
2026-09-08 15:39:00 +02:00
2026-09-07 14:50:36 +02:00
2026-06-22 11:59:16 +02:00
2026-06-18 17:41:35 +02:00
2026-09-02 13:03:23 +02:00
2026-09-02 13:03:23 +02:00
2026-09-08 15:39:00 +02:00
2026-09-03 11:47:35 +02:00
2026-09-08 15:39:00 +02:00
2026-06-01 16:12:57 +02:00
2025-02-18 17:59:58 +00:00
2025-02-18 17:59:58 +00:00
2026-05-07 16:21:30 +02:00
2026-09-08 15:39:00 +02:00
2025-02-18 17:59:58 +00:00
2026-09-02 13:03:23 +02:00
2026-09-08 15:39:00 +02:00
2025-02-18 17:59:58 +00:00
2026-09-08 15:39:00 +02:00
2026-09-08 18:12:40 +02:00
2026-09-08 18:12:40 +02:00
2026-09-03 16:10:26 +02:00
2025-03-13 17:51:41 -04:00
2026-04-15 20:03:49 +02:00
2026-09-11 18:30:33 +01:00
2025-02-18 17:59:58 +00:00
2026-09-08 15:39:00 +02:00
2026-09-02 16:56:09 +02:00
2025-10-08 17:37:54 -04:00
2026-09-03 12:55:52 +02:00
2025-03-03 14:41:31 +01:00
2026-09-01 18:54:27 +02:00
2025-09-18 12:58:47 +02:00
2025-02-18 17:59:58 +00:00
2025-02-18 17:59:58 +00:00
2025-02-18 17:59:58 +00:00
2026-09-01 18:30:05 +02:00
2026-09-02 13:03:23 +02:00
2026-09-08 15:39:00 +02:00
2025-02-18 17:59:58 +00:00
2026-04-27 13:54:00 +01:00
2025-02-18 17:59:58 +00:00
2026-04-23 09:49:14 -05:00
2025-03-13 17:51:41 -04:00
2025-02-18 17:59:58 +00:00
2025-02-18 17:59:58 +00:00
2026-09-01 18:54:27 +02:00
2026-04-03 17:48:42 +02:00
2026-09-09 17:01:16 +02:00
2026-09-08 15:39:00 +02:00
2026-04-17 11:13:41 +02:00
2026-06-18 17:41:35 +02:00
2025-07-11 00:24:46 -04:00
2026-09-08 13:52:34 +02:00
2026-09-08 13:52:34 +02:00
2026-08-05 10:54:49 +02:00
2025-06-05 13:54:57 +02:00
2025-02-18 17:59:58 +00:00
2025-02-24 18:18:15 +07:00
2025-06-05 13:54:57 +02:00
2025-06-05 13:54:57 +02:00
2025-06-05 13:54:57 +02:00
2025-06-05 13:54:57 +02:00
2025-06-24 08:28:15 -04:00
2025-02-18 17:59:58 +00:00
2025-02-18 17:59:58 +00:00
2025-02-18 17:59:58 +00:00
2025-02-18 17:59:58 +00:00
2025-05-15 20:46:39 +02:00
2025-03-13 17:51:41 -04:00
2026-09-08 15:38:59 +02:00
2026-09-08 15:38:59 +02:00
2026-09-08 13:49:19 +02:00
2026-09-08 13:49:19 +02:00
2026-09-03 12:55:52 +02:00
2026-09-03 12:55:52 +02:00
2025-03-13 17:51:41 -04:00
2026-09-08 15:38:59 +02:00
2026-09-02 16:56:09 +02:00
2026-09-02 16:56:09 +02:00