reach / reach-ui

The Accessible Foundation for React Apps and Design Systems
https://reacttraining.com/reach-ui/
MIT License
5.96k stars 563 forks source link

MenuItem: onFocus not working #839

Open gfohl opened 2 years ago

gfohl commented 2 years ago

🐛 Bug report

Current Behavior

onFocus in MenuItems doesn't seem to be working. Using example in docs for capture: https://user-images.githubusercontent.com/67913063/133138185-e1a2e579-36b0-4f8c-b331-3c01ef5e9812.mp4

Expected behavior

onFocus should detect focus with mouse/keyboard

Reproducible example

MenuItem element props: https://reach.tech/menu-button/#menuitem

Additional context

Discovered when my Menu was long and had some overflow. Using keyboard to navigate MenuItems does not scroll to current item.

Your environment

Name(s) Version
@reach/menu-button 0.15.1
React >= 16.2
Chrome Version 93.0.4577.63 (Official Build) (64-bit)
Node v10.13.0
npm v6.4.1
Windows 10
tlenclos commented 2 years ago

Seems to be the same with <ComboboxOption>