[CategoryPanel] 포커싱 이동 안 되는 버그 수정

This commit is contained in:
hyunwoo93.cha
2024-02-20 20:24:57 +09:00
parent 8947b7ac5a
commit b6d83240c1
2 changed files with 3 additions and 7 deletions

View File

@@ -2,7 +2,6 @@ import React from "react";
import { useSelector } from "react-redux";
import SpotlightContainerDecorator from "@enact/spotlight/SpotlightContainerDecorator";
import Spottable from "@enact/spotlight/Spottable";
import NoResultsCategoryShows from "../NoResultsCategory/NoResultsCategoryShows";
@@ -10,10 +9,6 @@ import css from "./ShowContents.module.less";
import ShowLists from "./ShowLists/ShowLists";
import ShowProductContents from "./ShowProductContents/ShowProductContents";
const Container = SpotlightContainerDecorator(
{ enterTo: "last-focused" },
"div"
);
const SpottableVideoContainer = Spottable("div");
export default function ShowContents() {
@@ -27,7 +22,7 @@ export default function ShowContents() {
topShowInfo &&
categoryShowInfos &&
categoryShowInfos.length > 0 && (
<Container>
<>
<h1 className={css.topsTitle}>{topShowInfo.showNm}</h1>
<div className={css.topShowContainer}>
<SpottableVideoContainer className={css.videoContainer}>
@@ -38,7 +33,7 @@ export default function ShowContents() {
<div>
<ShowLists />
</div>
</Container>
</>
)}
{categoryShowInfos && categoryShowInfos.length === 0 && (
<NoResultsCategoryShows />

View File

@@ -105,6 +105,7 @@ export default function CategoryPanel() {
scrollTop({ animate: false });
setContainerLastFocusedElement(null, [SpotlightIds.TBODY]);
setContainerLastFocusedElement(null, ["showProductBox"]);
setContainerLastFocusedElement(null, ["categoryContentsBox"]);
Spotlight.focus("tab-0");
}, [panelInfos]);