scroll nav elements into view when using the keyboard (#50434)

pull/50485/head
Ashley Harrison 3 years ago committed by GitHub
parent cf684ed38f
commit 3fa7f72d6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      public/app/core/components/NavBar/Next/NavBarItemMenuTrigger.tsx

@ -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…
Cancel
Save