diff --git a/apps/nextjs/src/app/[locale]/boards/(content)/_header-actions.tsx b/apps/nextjs/src/app/[locale]/boards/(content)/_header-actions.tsx index 1c2ea43d0..e6c8093af 100644 --- a/apps/nextjs/src/app/[locale]/boards/(content)/_header-actions.tsx +++ b/apps/nextjs/src/app/[locale]/boards/(content)/_header-actions.tsx @@ -269,7 +269,6 @@ const MobileMoreMenu = ({ showSettings }: { showSettings: boolean }) => { const tProfile = useScopedI18n("common.userAvatar.menu"); const reduceMotion = useReducedMotion(); const [opened, disclosure] = useDisclosure(false); - const moreTriggerRef = useRef(null); const pendingSectionAnchorId = useRef(null); const desktopLayout = getDesktopLayout(board); const sections = useMemo( @@ -285,14 +284,14 @@ const MobileMoreMenu = ({ showSettings }: { showSettings: boolean }) => { const focusPendingSection = () => { const anchorId = pendingSectionAnchorId.current; pendingSectionAnchorId.current = null; - if (anchorId && focusMobileBoardSection({ anchorId, reduceMotion })) return; + if (!anchorId) return; - moreTriggerRef.current?.focus({ preventScroll: true }); + focusMobileBoardSection({ anchorId, reduceMotion }); }; return ( <> - + { size="auto" padding="md" overlayProps={{ backgroundOpacity: 0.45, blur: 2 }} - returnFocus={false} onExitTransitionEnd={focusPendingSection} styles={{ content: {