mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
scroll nav elements into view when using the keyboard (#50434)
This commit is contained in:
parent
cf684ed38f
commit
3fa7f72d6c
@ -173,6 +173,9 @@ export function NavBarItemMenuTrigger(props: NavBarItemMenuTriggerProps): ReactE
|
||||
setMenuIdOpen(item.id);
|
||||
state.open();
|
||||
}
|
||||
e.target.scrollIntoView({
|
||||
block: 'nearest',
|
||||
});
|
||||
},
|
||||
onBlurWithin: (e) => {
|
||||
if (e.target?.getAttribute('role') === 'menuitem' && !overlayRef.current?.contains(e.relatedTarget)) {
|
||||
|
Loading…
Reference in New Issue
Block a user