[SHOPTIME-3977] Homebanner / Live Full 영상으로 랜딩 후 이전 버튼 클릭시 포커싱 사라짐 현상
[수정사항] 딮링크 Player 진입시 Home lastFocusId가 존재하지않아서 포커스를 잡지못하는 상황 lastFocusedTargetId가 없다면 HomeBanner ContainerId로 focus 되도록 수정
This commit is contained in:
@@ -4,16 +4,19 @@ import React, {
|
||||
useMemo,
|
||||
useRef,
|
||||
useState,
|
||||
} from "react";
|
||||
} from 'react';
|
||||
|
||||
import classNames from "classnames";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
import classNames from 'classnames';
|
||||
import {
|
||||
useDispatch,
|
||||
useSelector,
|
||||
} from 'react-redux';
|
||||
|
||||
import Spotlight from "@enact/spotlight";
|
||||
import Spotlight from '@enact/spotlight';
|
||||
import {
|
||||
getContainerNavigableElements,
|
||||
setContainerLastFocusedElement,
|
||||
} from "@enact/spotlight/src/container";
|
||||
} from '@enact/spotlight/src/container';
|
||||
|
||||
import {
|
||||
changeAppStatus,
|
||||
@@ -21,36 +24,44 @@ import {
|
||||
setExitApp,
|
||||
setHidePopup,
|
||||
setShowPopup,
|
||||
} from "../../actions/commonActions";
|
||||
import { getWelcomeEventInfo } from "../../actions/eventActions";
|
||||
} from '../../actions/commonActions';
|
||||
import { getWelcomeEventInfo } from '../../actions/eventActions';
|
||||
import {
|
||||
checkEnterThroughGNB,
|
||||
getHomeLayout,
|
||||
getHomeMainContents,
|
||||
updateHomeInfo,
|
||||
} from "../../actions/homeActions";
|
||||
import { sendLogGNB } from "../../actions/logActions";
|
||||
import { getSubCategory, getTop20Show } from "../../actions/mainActions";
|
||||
import { getHomeOnSaleInfo } from "../../actions/onSaleActions";
|
||||
import { finishVideoPreview } from "../../actions/playActions";
|
||||
import { getBestSeller } from "../../actions/productActions";
|
||||
import TBody from "../../components/TBody/TBody";
|
||||
import TButton, { TYPES } from "../../components/TButton/TButton";
|
||||
import TPanel from "../../components/TPanel/TPanel";
|
||||
import TPopUp from "../../components/TPopUp/TPopUp";
|
||||
import TVerticalPagenator from "../../components/TVerticalPagenator/TVerticalPagenator";
|
||||
import useDebugKey from "../../hooks/useDebugKey";
|
||||
import usePrevious from "../../hooks/usePrevious";
|
||||
import { ACTIVE_POPUP, LOG_MENU, panel_names } from "../../utils/Config";
|
||||
import { $L } from "../../utils/helperMethods";
|
||||
import { SpotlightIds } from "../../utils/SpotlightIds";
|
||||
import BestSeller from "../HomePanel/BestSeller/BestSeller";
|
||||
import HomeBanner from "../HomePanel/HomeBanner/HomeBanner";
|
||||
import HomeOnSale from "../HomePanel/HomeOnSale/HomeOnSale";
|
||||
import css from "../HomePanel/HomePanel.module.less";
|
||||
import PopularShow from "../HomePanel/PopularShow/PopularShow";
|
||||
import SubCategory from "../HomePanel/SubCategory/SubCategory";
|
||||
import EventPopUpBanner from "./EventPopUpBanner/EventPopUpBanner";
|
||||
} from '../../actions/homeActions';
|
||||
import { sendLogGNB } from '../../actions/logActions';
|
||||
import {
|
||||
getSubCategory,
|
||||
getTop20Show,
|
||||
} from '../../actions/mainActions';
|
||||
import { getHomeOnSaleInfo } from '../../actions/onSaleActions';
|
||||
import { finishVideoPreview } from '../../actions/playActions';
|
||||
import { getBestSeller } from '../../actions/productActions';
|
||||
import TBody from '../../components/TBody/TBody';
|
||||
import TButton, { TYPES } from '../../components/TButton/TButton';
|
||||
import TPanel from '../../components/TPanel/TPanel';
|
||||
import TPopUp from '../../components/TPopUp/TPopUp';
|
||||
import TVerticalPagenator
|
||||
from '../../components/TVerticalPagenator/TVerticalPagenator';
|
||||
import useDebugKey from '../../hooks/useDebugKey';
|
||||
import usePrevious from '../../hooks/usePrevious';
|
||||
import {
|
||||
ACTIVE_POPUP,
|
||||
LOG_MENU,
|
||||
panel_names,
|
||||
} from '../../utils/Config';
|
||||
import { $L } from '../../utils/helperMethods';
|
||||
import { SpotlightIds } from '../../utils/SpotlightIds';
|
||||
import BestSeller from '../HomePanel/BestSeller/BestSeller';
|
||||
import HomeBanner from '../HomePanel/HomeBanner/HomeBanner';
|
||||
import HomeOnSale from '../HomePanel/HomeOnSale/HomeOnSale';
|
||||
import css from '../HomePanel/HomePanel.module.less';
|
||||
import PopularShow from '../HomePanel/PopularShow/PopularShow';
|
||||
import SubCategory from '../HomePanel/SubCategory/SubCategory';
|
||||
import EventPopUpBanner from './EventPopUpBanner/EventPopUpBanner';
|
||||
|
||||
export const TEMPLATE_CODE_CONF = {
|
||||
TOP: "DSP00101",
|
||||
@@ -494,6 +505,8 @@ const HomePanel = ({ isOnTop }) => {
|
||||
useEffect(() => {
|
||||
if (isOnTop && panelInfo?.lastFocusedTargetId) {
|
||||
Spotlight.focus(panelInfo.lastFocusedTargetId);
|
||||
} else if (isOnTop && !panelInfo?.lastFocusedTargetId) {
|
||||
Spotlight.focus(sortedHomeLayoutInfo[0]?.shptmApphmDspyOptCd);
|
||||
}
|
||||
}, [isOnTop]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user