mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-24 12:44:18 +08:00
81d6002ace
* fix(provider-preset-selector): after searching presets, it is impossible to select search results. feat(provider-preset-selector): add keyboard shortcut for search input and improve focus handling. * fix(provider-list): prevent keydown event from triggering when default is prevented * fix(provider-preset): keep preset clickable after search and restore keyboard UX - ProviderList: scope the typing guard to the Ctrl/Cmd+F branch so Escape still closes the search panel (the top-level early return swallowed it); reuse isTextEditableTarget instead of re-implementing the check. - ProviderPresetSelector: drop the rAF select() that raced with typing and ate the first character (gateway -> ateway), and restore the input autoFocus for the open-by-click path; refocus via rAF when Ctrl/Cmd+F is pressed while the box is already open so focus returns to the input. - Add a regression test for the re-focus-on-shortcut behavior. --------- Co-authored-by: Jason <farion1231@gmail.com>