[SHOPTIME-3603] Product Detail / Media 한번 재생이 끝난 후 다시 클릭하여 Full 화면 진입시 현상
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import React, { useCallback, useMemo } from "react";
|
||||
import React, { useCallback, useEffect, useMemo, useRef } from "react";
|
||||
|
||||
import classNames from "classnames";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
@@ -9,12 +9,12 @@ import Spottable from "@enact/spotlight/Spottable";
|
||||
import Marquee from "@enact/ui/Marquee";
|
||||
|
||||
import defaultLogoImg from "../../../../assets/images/ic-tab-partners-default@3x.png";
|
||||
import { setShowPopup } from "../../../actions/commonActions";
|
||||
import CustomImage from "../../../components/CustomImage/CustomImage";
|
||||
import { ACTIVE_POPUP } from "../../../utils/Config";
|
||||
import { SpotlightIds } from "../../../utils/SpotlightIds";
|
||||
import PlayerTabButton from "../PlayerTabContents/TabButton/PlayerTabButton";
|
||||
import css from "./PlayerOverlayContents.module.less";
|
||||
import { setShowPopup } from "../../../actions/commonActions";
|
||||
import { ACTIVE_POPUP } from "../../../utils/Config";
|
||||
|
||||
const SpottableBtn = Spottable("button");
|
||||
|
||||
@@ -46,6 +46,17 @@ export default function PlayerOverlayContents({
|
||||
onClick(ev);
|
||||
}
|
||||
};
|
||||
const backBtnRef = useRef(null);
|
||||
|
||||
useEffect(() => {
|
||||
if (
|
||||
panelInfo?.shptmBanrTpNm === "MEDIA" &&
|
||||
!panelInfo.modal &&
|
||||
backBtnRef.current
|
||||
) {
|
||||
Spotlight.focus(SpotlightIds.PLAYER_BACK_BUTTON);
|
||||
}
|
||||
}, [panelInfo?.shptmBanrTpNm, panelInfo.modal, backBtnRef.current]);
|
||||
|
||||
const handleSubtitleOnClick = useCallback(() => {
|
||||
if (!captionEnable) {
|
||||
@@ -209,6 +220,7 @@ export default function PlayerOverlayContents({
|
||||
spotlightId="player-back-button"
|
||||
onSpotlightDown={onSpotlightMoveMediaButton}
|
||||
aria-label="Video Player Close"
|
||||
ref={backBtnRef}
|
||||
/>
|
||||
<div
|
||||
className={classNames(
|
||||
|
||||
@@ -1097,10 +1097,11 @@ const PlayerPanel = ({
|
||||
}
|
||||
|
||||
// 미디어 포커스
|
||||
if (panelInfo.shptmBanrTpNm === "MEDIA" && !panelInfo.modal) {
|
||||
Spotlight.focus(SpotlightIds.PLAYER_BACK_BUTTON);
|
||||
return;
|
||||
}
|
||||
// if (panelInfo.shptmBanrTpNm === "MEDIA" && !panelInfo.modal) {
|
||||
// Spotlight.focus(SpotlightIds.PLAYER_BACK_BUTTON);
|
||||
// return;
|
||||
// }
|
||||
|
||||
// 화살표버튼 포커스
|
||||
const current = Spotlight.getCurrent();
|
||||
let hasProperSpot = false;
|
||||
|
||||
Reference in New Issue
Block a user