Below is a small React component for a quick actions panel. The panel opens via a button, lets you move through the list with the keyboard, and confirm the selected action without using the mouse. After a recent PR, the behavior became unstable.
ArrowUp and ArrowDown navigation must change the active item only within the current visible list.Enter must confirm exactly the item that is currently active on screen.pinnedOnly flag, the active item and confirmation must remain consistent with the rendered list.Open shortcuts button.ArrowDown, then Enter.Close button.ArrowDown each time.Pinned only.ArrowDown, then Enter, and compare the confirmed item with the visually active row.Pinned only is enabled, confirmation should use the same item that is highlighted in the list as active.19.0.0, React DOM 19.0.05.8.3development under StrictModewindow, and the action list arrives synchronously via propsUse line comments to explain the problem, its impact, the fix and how to test it.