jaeone94
5da3e16f33
fix: preserve single-select values on reselection ( #13608 )
...
## Summary
Prevent single-select dropdowns from clearing their value when the
currently selected item is selected again. This fixes Load Image and
Load Video previews switching to a missing-media error after media
reselection.
Linear: FE-1239
## Changes
- **What**: Keep the current single-select value, close the dropdown,
and restore trigger focus when the selected item is chosen again.
- **Breaking**: None.
- **Dependencies**: None.
## Review Focus
The behavior is implemented in the shared `FormDropdown` selection
handler, so it applies consistently to all single-select dropdown
consumers rather than special-casing media widgets. Multi-select
toggling remains unchanged.
## Red-Green Verification
- `383576446` adds the unit and Playwright regressions without the
production fix. CI Unit run `29196142841` failed on the new
empty-selection assertion, proving red.
- `d4ae9eb2c` adds the production fix after the red result was
confirmed. CI Unit run `29196531028` passed the same Vitest suite green.
## Test Plan
- Unit regression verifies no selection update is emitted and the
dropdown closes with focus restored.
- Playwright regression reselects `example.png` in Load Image and
verifies the menu closes, the value remains selected, and no load error
appears.
- Targeted Playwright regression passed 10 consecutive local runs with
the production fix applied locally.
## Screenshots (if applicable)
Before
https://github.com/user-attachments/assets/c3724e16-04fc-4b88-bd92-87004db71596
After
https://github.com/user-attachments/assets/c99924f1-e446-4eca-aef7-cb8df961ab22
2026-07-15 22:52:11 +00:00
..
2026-04-28 08:52:49 +00:00
2026-07-13 18:52:34 +00:00
2026-03-15 22:46:47 +09:00
2026-03-15 22:46:47 +09:00
2026-07-09 02:10:13 +00:00
2025-12-29 15:03:34 -08:00
2026-07-13 18:52:34 +00:00
2026-03-15 22:46:47 +09:00
2026-03-28 13:08:52 -07:00
2026-07-13 18:52:34 +00:00
2026-06-02 01:05:48 +00:00
2026-07-12 23:09:54 -04:00
2026-05-06 02:40:01 +00:00
2026-03-15 22:46:47 +09:00
2026-06-19 14:57:31 +00:00
2026-03-28 23:19:04 -07:00
2026-07-08 19:46:54 +00:00
2026-07-03 02:31:41 +00:00
2025-12-08 19:48:11 -07:00
2026-03-15 22:46:47 +09:00
2025-12-08 19:48:11 -07:00
2026-07-13 18:52:34 +00:00
2026-05-27 00:29:11 -07:00
2026-07-09 00:31:25 +00:00
2026-05-18 18:59:20 +00:00
2026-03-15 22:46:47 +09:00
2026-03-15 22:46:47 +09:00
2026-06-18 21:16:24 +00:00
2026-07-13 18:52:34 +00:00
2026-06-05 21:56:54 +00:00
2026-07-15 09:20:31 +00:00
2026-07-03 02:31:41 +00:00
2026-03-29 08:27:53 +09:00
2026-06-22 09:22:14 +00:00
2026-07-13 18:52:34 +00:00
2026-07-15 22:52:11 +00:00
2026-03-15 22:46:47 +09:00
2026-04-16 12:54:12 +00:00
2026-04-28 19:13:12 -04:00
2026-07-13 18:52:34 +00:00
2026-04-28 02:18:31 +00:00
2026-05-21 19:25:26 +00:00
2026-05-21 02:26:26 +00:00
2026-05-14 12:28:21 -07:00
2026-04-28 02:18:31 +00:00
2026-07-01 15:24:45 +09:00
2026-04-15 11:42:22 +00:00
2026-04-15 11:42:22 +00:00
2026-04-28 02:18:31 +00:00
2026-04-10 19:47:20 +00:00
2026-05-12 14:42:31 +00:00
2026-05-07 10:27:15 +00:00
2026-04-08 11:28:59 -07:00
2026-07-09 02:10:13 +00:00
2026-04-14 23:33:11 +00:00
2026-05-19 01:55:11 +00:00
2026-06-24 11:05:01 +00:00
2026-06-23 10:41:14 +00:00
2026-04-16 12:54:12 +00:00
2026-05-14 12:28:21 -07:00
2026-04-28 02:18:31 +00:00
2026-04-28 17:21:55 +00:00
2026-04-15 15:25:47 +00:00
2026-05-27 00:29:11 -07:00
2026-06-02 00:36:43 +00:00
2026-04-16 12:54:12 +00:00
2026-05-05 11:17:30 +00:00
2026-06-26 22:54:04 +00:00
2026-06-23 19:43:44 +00:00
2026-07-09 21:20:03 +00:00
2026-06-25 02:30:07 +00:00
2026-04-16 12:38:01 +00:00
2026-06-13 02:40:58 +00:00
2026-04-09 20:50:56 -07:00
2026-04-08 11:28:59 -07:00
2026-04-08 11:28:59 -07:00
2026-04-16 09:44:06 +00:00
2026-06-25 06:59:00 +00:00
2026-05-17 20:54:07 -04:00
2026-04-13 20:43:25 +00:00
2026-05-12 15:06:13 +09:00
2026-05-08 12:11:06 +00:00
2026-05-27 05:05:26 +00:00
2026-04-11 01:25:14 +00:00
2026-04-28 02:18:31 +00:00
2026-06-04 06:28:14 +00:00
2026-05-29 17:20:54 +00:00
2026-06-03 20:51:23 +00:00
2026-04-11 01:25:14 +00:00
2026-04-20 17:35:17 -07:00
2026-04-16 13:43:02 +09:00
2026-07-01 15:24:45 +09:00
2026-04-15 15:25:47 +00:00
2026-05-04 20:30:42 +00:00
2026-06-18 21:16:24 +00:00
2026-05-04 20:30:42 +00:00
2026-04-20 22:43:28 +00:00
2026-05-12 15:06:13 +09:00
2026-06-26 22:54:04 +00:00
2026-06-26 22:54:04 +00:00
2026-04-09 20:50:56 -07:00
2026-06-20 03:32:41 +00:00
2026-04-14 17:40:23 +00:00
2026-06-08 23:26:13 +00:00
2026-04-10 19:47:20 +00:00
2026-04-09 20:50:56 -07:00
2026-05-04 12:54:52 -07:00
2026-05-05 08:47:07 +00:00
2026-07-01 15:24:45 +09:00
2026-04-28 22:02:42 +00:00
2026-04-08 11:28:59 -07:00
2026-05-13 10:35:16 +00:00
2026-04-09 20:50:56 -07:00
2026-04-28 08:33:42 -04:00
2026-07-13 18:52:34 +00:00
2026-05-04 20:31:15 -04:00
2026-06-23 16:54:59 +00:00
2026-04-13 20:43:25 +00:00
2026-05-13 20:33:19 +00:00
2026-07-10 20:24:20 +00:00
2026-04-15 15:25:47 +00:00
2026-05-11 18:51:52 +00:00
2026-05-29 22:28:08 +09:00
2026-05-26 00:47:30 +00:00
2026-04-11 01:25:14 +00:00
2026-06-26 22:54:04 +00:00
2026-06-19 19:50:04 +00:00
2026-06-26 17:57:58 +00:00
2026-06-26 22:54:04 +00:00
2026-05-29 02:03:44 +00:00
2026-04-29 20:52:58 +00:00
2026-06-12 18:18:34 +00:00
2026-04-23 19:33:18 +00:00
2026-04-08 11:28:59 -07:00
2026-04-13 20:43:25 +00:00
2026-06-19 14:05:49 +00:00
2026-04-13 20:43:25 +00:00
2026-05-06 01:54:18 -07:00
2026-07-09 17:03:19 +00:00
2026-05-27 00:29:11 -07:00
2026-04-08 11:28:59 -07:00
2026-05-06 15:07:57 +00:00
2026-05-02 05:40:45 +00:00
2026-04-10 19:47:20 +00:00
2026-04-13 20:43:25 +00:00
2026-04-13 20:43:25 +00:00
2026-06-26 22:54:04 +00:00
2026-04-14 17:40:23 +00:00
2026-04-14 17:40:23 +00:00
2026-05-26 00:47:30 +00:00
2026-04-28 09:46:25 -04:00
2026-05-06 02:40:01 +00:00
2026-04-28 02:18:31 +00:00
2026-04-15 15:25:47 +00:00
2026-06-12 02:44:02 +00:00
2026-05-14 02:26:11 +00:00
2026-05-29 22:28:08 +09:00
2026-05-04 20:30:42 +00:00
2026-05-19 10:56:41 +00:00
2026-05-20 02:59:44 +00:00
2026-06-19 00:59:00 +00:00
2026-06-19 00:51:52 +00:00
2026-07-03 23:55:52 +00:00
2026-04-08 11:28:59 -07:00
2026-06-17 21:00:02 +00:00
2026-06-06 00:26:51 +00:00
2026-04-14 17:40:23 +00:00
2026-05-04 12:54:52 -07:00
2026-04-08 11:28:59 -07:00
2026-04-11 01:25:14 +00:00
2026-04-13 20:43:25 +00:00
2026-04-15 15:25:47 +00:00
2026-04-22 11:29:08 -07:00
2026-04-11 01:25:14 +00:00
2026-07-03 02:31:41 +00:00
2026-05-04 21:51:50 +00:00
2026-05-22 15:24:31 +00:00
2026-06-26 22:54:04 +00:00
2026-04-13 20:43:25 +00:00
2026-06-15 12:41:14 +00:00
2026-05-11 09:28:23 +00:00
2026-04-11 01:25:14 +00:00