From d1351ab4423db3cecc569cfbb1c327ccef075b4d Mon Sep 17 00:00:00 2001 From: Dev TWIN0906 Date: Thu, 5 Jun 2025 15:27:06 +0900 Subject: [PATCH] =?UTF-8?q?ShopTime-4011=20=EC=88=98=EC=A0=95=20=EB=B0=8F?= =?UTF-8?q?=20onSaleNav=20=ED=8F=AC=EC=BB=A4=EC=8B=B1=EB=B0=8F=20=EC=8A=A4?= =?UTF-8?q?=ED=81=AC=EB=A1=A4=EC=9D=B4=EB=8F=99=EC=95=88=EB=90=98=EB=8A=94?= =?UTF-8?q?=20=EB=AC=B8=EC=A0=9C=20=EC=B6=94=EA=B0=80=EC=88=98=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/OnSalePanel/OnSaleNav/OnSaleNav.jsx | 18 ++++++++++++------ .../src/views/OnSalePanel/OnSalePanel.jsx | 8 ++------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/com.twin.app.shoptime/src/views/OnSalePanel/OnSaleNav/OnSaleNav.jsx b/com.twin.app.shoptime/src/views/OnSalePanel/OnSaleNav/OnSaleNav.jsx index 1774207e..d0f23d6e 100644 --- a/com.twin.app.shoptime/src/views/OnSalePanel/OnSaleNav/OnSaleNav.jsx +++ b/com.twin.app.shoptime/src/views/OnSalePanel/OnSaleNav/OnSaleNav.jsx @@ -7,6 +7,7 @@ import TScroller from "../../../components/TScroller/TScroller"; import useScrollTo from "../../../hooks/useScrollTo"; import css from "./OnSaleNav.module.less"; import OnSaleNavItem from "./OnSaleNavItem/OnSaleNavItem"; +import Spotlight from "@enact/spotlight"; const Container = SpotlightContainerDecorator( { leaveFor: { right: "" }, enterTo: "last-focused" }, @@ -59,22 +60,27 @@ export default function OnSaleNav({ const x = offsetFromContainerLeft - containerWidth + clippedWidth; - scrollLeft({ x }); + setTimeout(() => { + scrollLeft({ x }); + }, 100); } } }, [panelInfoLgCatCd, scrollLeft]); useEffect(() => { - if (panelInfoLgCatCd && previousPanelIsDetail) { - const node = document // - .querySelector(`[data-spotlight-id=spotlightId-${panelInfoLgCatCd}]`); - + if (panelInfoLgCatCd) { + const node = document.querySelector( + `[data-spotlight-id=spotlightId-${panelInfoLgCatCd}]` + ); if (node) { const containerId = "on-sale-nav"; setContainerLastFocusedElement(node, [containerId]); } + setTimeout(() => { + Spotlight.focus(node); + }, 100); } - }, [panelInfoLgCatCd, previousPanelIsDetail]); + }, [panelInfoLgCatCd]); return (