### Fixes #31865 ### Problem When navigating a picker (command palette, file finder, etc.) with the keyboard and then hovering with the mouse, two items would appear highlighted at the same time - one from the keyboard selection ghost_element_selected background and one from the CSS style ghost_element_hover background. This happened because GPUI's CSS hover is applied at paint time independently from the Rust selection state. ### Solution Added a keyboard_navigated: bool flag to [Picker] to track whether the last navigation was via keyboard or mouse. When a keyboard navigation action fires (↑, ↓, Home, End, etc.), `keyboard_navigated` is set to true. A transparent `block_mouse_except_scroll` overlay div is added on top of each list item, preventing the CSS style from firing on `ListItem` children. When the mouse moves over any item, the overlay's `on_mouse_move` handler fires, clears keyboard_navigated, moves the selection to that item, and re-renders - removing all overlays and restoring normal mouse hover behavior. The `on_hover` handler also moves the selection to whichever item the mouse enters, so mouse navigation is fully functional. Clicks work through the overlay since `block_mouse_except_scroll` only affects hover hit-testing, not click events on the parent div. ### Behavior Matches VS Code / IntelliJ — keyboard navigation suppresses hover highlights until the mouse moves, at which point normal hover resumes. Only one item is ever highlighted at a time. ### Video [Screencast from 2026-03-05 19-20-16.webm](https://github.com/user-attachments/assets/7a8a543a-95f3-481f-b59d-171604e5f883) --------- Co-authored-by: Nathan Sobo <nathan@zed.dev>
3 files changedLine totals unavailable