[SHOPTIME-3954] 미국 / Home / Popular show / 영상 진입 후 이전 버튼 클릭시 포커싱 사라짐
수정 내용: popularShow에서 updateHomeInfo -> lastFocusedTargetrId 추가
This commit is contained in:
@@ -492,11 +492,7 @@ const HomePanel = ({ isOnTop }) => {
|
|||||||
}, [dispatch]);
|
}, [dispatch]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (
|
if (isOnTop && panelInfo?.lastFocusedTargetId) {
|
||||||
isOnTop &&
|
|
||||||
panelInfo?.focusedContainerId === TEMPLATE_CODE_CONF.TOP &&
|
|
||||||
panelInfo?.lastFocusedTargetId
|
|
||||||
) {
|
|
||||||
Spotlight.focus(panelInfo.lastFocusedTargetId);
|
Spotlight.focus(panelInfo.lastFocusedTargetId);
|
||||||
}
|
}
|
||||||
}, [isOnTop]);
|
}, [isOnTop]);
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ import { useDispatch, useSelector } from "react-redux";
|
|||||||
import Spotlight from "@enact/spotlight";
|
import Spotlight from "@enact/spotlight";
|
||||||
import { SpotlightContainerDecorator } from "@enact/spotlight/SpotlightContainerDecorator";
|
import { SpotlightContainerDecorator } from "@enact/spotlight/SpotlightContainerDecorator";
|
||||||
import Spottable from "@enact/spotlight/Spottable";
|
import Spottable from "@enact/spotlight/Spottable";
|
||||||
|
import { getContainerId } from "@enact/spotlight/src/container";
|
||||||
|
|
||||||
|
import { updateHomeInfo } from "../../../actions/homeActions";
|
||||||
import { pushPanel } from "../../../actions/panelActions";
|
import { pushPanel } from "../../../actions/panelActions";
|
||||||
import { startVideoPlayer } from "../../../actions/playActions";
|
import { startVideoPlayer } from "../../../actions/playActions";
|
||||||
import SectionTitle from "../../../components/SectionTitle/SectionTitle";
|
import SectionTitle from "../../../components/SectionTitle/SectionTitle";
|
||||||
@@ -59,6 +61,17 @@ const PopularShow = ({
|
|||||||
|
|
||||||
const handleCardClick = useCallback(
|
const handleCardClick = useCallback(
|
||||||
(patnrId, showId, catCd, showUrl) => () => {
|
(patnrId, showId, catCd, showUrl) => () => {
|
||||||
|
const lastFocusedTargetId = getContainerId(Spotlight.getCurrent());
|
||||||
|
|
||||||
|
if (lastFocusedTargetId) {
|
||||||
|
dispatch(
|
||||||
|
updateHomeInfo({
|
||||||
|
name: panel_names.HOME_PANEL,
|
||||||
|
panelInfo: { lastFocusedTargetId },
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
dispatch(
|
dispatch(
|
||||||
startVideoPlayer({
|
startVideoPlayer({
|
||||||
showId,
|
showId,
|
||||||
|
|||||||
Reference in New Issue
Block a user