Browse Source

fix: update selector for active menu item in useMenuScroll hook (#7829)

pull/7835/head
AxiosLeo 5 months ago
committed by GitHub
parent
commit
5907c04e00
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      packages/@core/ui-kit/menu-ui/src/hooks/use-menu-scroll.ts

2
packages/@core/ui-kit/menu-ui/src/hooks/use-menu-scroll.ts

@ -20,7 +20,7 @@ export function useMenuScroll(
if (!isEnabled) return; if (!isEnabled) return;
const activeElement = document.querySelector( const activeElement = document.querySelector(
`aside li[role=menuitem].is-active`, `aside a[role=menuitem].is-active`,
); );
if (activeElement) { if (activeElement) {
activeElement.scrollIntoView({ activeElement.scrollIntoView({

Loading…
Cancel
Save