From d6bb6542c441f79a495aa78d85633483d7ea08f2 Mon Sep 17 00:00:00 2001 From: ajnart Date: Wed, 29 Jul 2026 20:06:59 +0200 Subject: [PATCH] Revert "fix: preserve mobile section focus" This reverts commit 7ce1081161ba0091756323186c1b743acdd886e1. --- .../src/app/[locale]/boards/(content)/_header-actions.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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: {