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 e6c8093af..1c2ea43d0 100644 --- a/apps/nextjs/src/app/[locale]/boards/(content)/_header-actions.tsx +++ b/apps/nextjs/src/app/[locale]/boards/(content)/_header-actions.tsx @@ -269,6 +269,7 @@ 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( @@ -284,14 +285,14 @@ const MobileMoreMenu = ({ showSettings }: { showSettings: boolean }) => { const focusPendingSection = () => { const anchorId = pendingSectionAnchorId.current; pendingSectionAnchorId.current = null; - if (!anchorId) return; + if (anchorId && focusMobileBoardSection({ anchorId, reduceMotion })) return; - focusMobileBoardSection({ anchorId, reduceMotion }); + moreTriggerRef.current?.focus({ preventScroll: true }); }; return ( <> - + { size="auto" padding="md" overlayProps={{ backgroundOpacity: 0.45, blur: 2 }} + returnFocus={false} onExitTransitionEnd={focusPendingSection} styles={{ content: {