diff --git a/com.twin.app.shoptime/src/views/HomePanel/HomePanel.jsx b/com.twin.app.shoptime/src/views/HomePanel/HomePanel.jsx index 1241533d..e2ecd02a 100644 --- a/com.twin.app.shoptime/src/views/HomePanel/HomePanel.jsx +++ b/com.twin.app.shoptime/src/views/HomePanel/HomePanel.jsx @@ -492,11 +492,7 @@ const HomePanel = ({ isOnTop }) => { }, [dispatch]); useEffect(() => { - if ( - isOnTop && - panelInfo?.focusedContainerId === TEMPLATE_CODE_CONF.TOP && - panelInfo?.lastFocusedTargetId - ) { + if (isOnTop && panelInfo?.lastFocusedTargetId) { Spotlight.focus(panelInfo.lastFocusedTargetId); } }, [isOnTop]); diff --git a/com.twin.app.shoptime/src/views/HomePanel/PopularShow/PopularShow.jsx b/com.twin.app.shoptime/src/views/HomePanel/PopularShow/PopularShow.jsx index 749ff5c9..896de7fa 100644 --- a/com.twin.app.shoptime/src/views/HomePanel/PopularShow/PopularShow.jsx +++ b/com.twin.app.shoptime/src/views/HomePanel/PopularShow/PopularShow.jsx @@ -5,7 +5,9 @@ import { useDispatch, useSelector } from "react-redux"; import Spotlight from "@enact/spotlight"; import { SpotlightContainerDecorator } from "@enact/spotlight/SpotlightContainerDecorator"; import Spottable from "@enact/spotlight/Spottable"; +import { getContainerId } from "@enact/spotlight/src/container"; +import { updateHomeInfo } from "../../../actions/homeActions"; import { pushPanel } from "../../../actions/panelActions"; import { startVideoPlayer } from "../../../actions/playActions"; import SectionTitle from "../../../components/SectionTitle/SectionTitle"; @@ -59,6 +61,17 @@ const PopularShow = ({ const handleCardClick = useCallback( (patnrId, showId, catCd, showUrl) => () => { + const lastFocusedTargetId = getContainerId(Spotlight.getCurrent()); + + if (lastFocusedTargetId) { + dispatch( + updateHomeInfo({ + name: panel_names.HOME_PANEL, + panelInfo: { lastFocusedTargetId }, + }) + ); + } + dispatch( startVideoPlayer({ showId,