Input
options = ["Apple", "Banana", "Cherry", "Date"] User opens menu, presses ArrowDown twice, then Enter
Output
Trigger text changes to "Cherry", menu closes
The starter code has a dropdown that opens/closes on click and supports mouse selection. Extend it with keyboard navigation without breaking mouse behavior. Add: ArrowDown/ArrowUp moves the highlight (no wrap-around); E...
index.htmlEditable templatestyles.cssEditable startermain.jsEditable starteroptions = ["Apple", "Banana", "Cherry", "Date"] User opens menu, presses ArrowDown twice, then Enter
Trigger text changes to "Cherry", menu closes
Can you add type-ahead: when the user types a letter while the menu is open, jump to the first option starting with that letter?