From 0c69c553ab6440a0bf839448a8a284efb66db8a4 Mon Sep 17 00:00:00 2001 From: Ostap Piatkovskyi <44294945+ost-ptk@users.noreply.github.com> Date: Wed, 4 Oct 2023 11:34:49 +0300 Subject: [PATCH] fixed issue with the navigation menu screen scroll (#818) Co-authored-by: ost-ptk --- src/apps/popup/pages/navigation-menu/index.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/apps/popup/pages/navigation-menu/index.tsx b/src/apps/popup/pages/navigation-menu/index.tsx index a7cf1b08a..3dbd15ee0 100644 --- a/src/apps/popup/pages/navigation-menu/index.tsx +++ b/src/apps/popup/pages/navigation-menu/index.tsx @@ -1,4 +1,4 @@ -import React, { useMemo } from 'react'; +import React, { useEffect, useMemo } from 'react'; import { useTranslation } from 'react-i18next'; import { useSelector } from 'react-redux'; import { useNavigate } from 'react-router-dom'; @@ -76,6 +76,12 @@ export function NavigationMenuPageContent() { const { openWindow } = useWindowManager(); const { closeNavigationMenu } = useNavigationMenu(); + useEffect(() => { + const container = document.querySelector('#ms-container'); + + container?.scrollTo(0, 0); + }, []); + const menuGroups: MenuGroup[] = useMemo( () => [ {