From 8f4611fe8d1068e5f5630aaab09c878305e7063f Mon Sep 17 00:00:00 2001 From: "jiwon93.son" Date: Mon, 10 Nov 2025 09:55:31 +0900 Subject: [PATCH] =?UTF-8?q?[shoptime-3994]=20=EB=9D=BC=EC=9D=B4=EB=B8=8C?= =?UTF-8?q?=20=EC=83=81=ED=92=88=20=ED=81=B4=EB=A6=AD=EC=8B=9C=EC=97=90?= =?UTF-8?q?=EB=A7=8C=20=EC=83=81=ED=92=88=EB=A6=AC=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=EB=A1=9C=20=ED=8F=AC=EC=BB=A4=EC=8A=A4=20=EA=B0=80=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/PlayerPanel/PlayerPanel.jsx | 31 +++++++++++++------ 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx index 237c2f84..e5e4a4c9 100644 --- a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx +++ b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx @@ -873,7 +873,6 @@ const PlayerPanel = ({ const onClickBack = useCallback( (ev, isEnd) => { //modal로부터 Full 전환된 경우 다시 preview 모드로 돌아감. - console.log("###onClickBack", backupInitialIndex, isEnd); if ( sideContentsVisible && !videoVerticalVisible && @@ -977,7 +976,7 @@ const PlayerPanel = ({ // 아이템클릭 진입시 포커스 let hasProperSpot = false; let targetId; - if (!isInitialFocusOccurred) { + if (!isInitialFocusOccurred || panelInfo.targetId) { targetId = panelInfo.targetId; initialFocusTimeoutJob.current.start(() => { @@ -999,6 +998,11 @@ const PlayerPanel = ({ if (retryTarget) { Spotlight.focus(retryTarget); setIsInitialFocusOccurred(true); + } else { + if (shopNowInfo?.length > 0) { + Spotlight.focus("playVideoShopNowBox"); + setIsInitialFocusOccurred(true); + } } }); } @@ -1009,6 +1013,7 @@ const PlayerPanel = ({ panelInfo.targetId, panelInfo.modal, videoVerticalVisible, + shopNowInfo, ]); const videoInitialFocused = useCallback(() => { @@ -1033,15 +1038,15 @@ const PlayerPanel = ({ } } - if (!panelInfo.modal && !videoVerticalVisible && !hasProperSpot) { - Spotlight.focus(SpotlightIds.PLAYER_TAB_BUTTON); - return; - } - //비디오 진입시 포커스 if (panelInfo.isIndicatorByClick && shopNowInfo?.length > 0) { Spotlight.focus("playVideoShopNowBox"); return; } + + if (!panelInfo.modal && !videoVerticalVisible && !hasProperSpot) { + Spotlight.focus(SpotlightIds.PLAYER_TAB_BUTTON); + return; + } }, [ shopNowInfo, videoVerticalVisible, @@ -1236,12 +1241,16 @@ const PlayerPanel = ({ videoInitialFocused(); } } - }, [playListInfo]); + }, [playListInfo, panelInfo.targetId]); //10초 후 닫힐때 TabButton 포커스 useEffect(() => { if (playListInfo && playListInfo.length > 0) { - videoInitialFocused(); + if (panelInfo.targetId) { + videoItemFocused(); + } else { + videoInitialFocused(); + } } }, [sideContentsVisible, panelInfo.modal]); @@ -1918,6 +1927,7 @@ const PlayerPanel = ({ }, }) ); + Spotlight.focus("playVideoShopNowBox"); } } if (!sideContentsVisible) { @@ -1930,6 +1940,7 @@ const PlayerPanel = ({ selectedIndex, sideContentsVisible, initialEnter, + panelInfo, ]); const handleIndicatorUpClick = useCallback(() => { @@ -1971,6 +1982,7 @@ const PlayerPanel = ({ }, }) ); + Spotlight.focus("playVideoShopNowBox"); } } if (!sideContentsVisible) { @@ -1983,6 +1995,7 @@ const PlayerPanel = ({ selectedIndex, sideContentsVisible, initialEnter, + panelInfo, ]); useEffect(() => {