mirror of
https://github.com/penpot/penpot.git
synced 2026-08-13 16:28:59 +00:00
When the user types a search term that filters out the currently-active font, the picker showed no selection at all and Enter would close without applying any font. Fix: - Compute effective-selected (render-only, no state mutation) as the first filtered font when the current font is absent from the results. The row renderer and recent-fonts list use this for the tick mark, so the top match is visually pre-selected while the user types. - Enter key applies first-result (via on-select then on-close) when the current selection is not in the filtered list; otherwise closes as before. No font is live-applied on every keystroke. - on-key-down deps extended to on-select/on-close; effect deps include on-key-down so the global listener is always current. Avoids the live-apply side-effect that caused the revert of #9512. Fixes #3204. Signed-off-by: Filip Sajdak <filip.sajdak@siili.com> Co-authored-by: Andrey Antukh <niwi@niwi.nz>