From d8030aba11becfdf651fd78a6002dcbf416ba441 Mon Sep 17 00:00:00 2001 From: optrader Date: Wed, 19 Nov 2025 10:26:09 +0900 Subject: [PATCH] [251119] fix: PlayerPanel - 2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🕐 커밋 시간: 2025. 11. 19. 10:26:09 📊 변경 통계: • 총 파일: 2개 • 추가: +13줄 • 삭제: -5줄 📝 수정된 파일: ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/TabContainer.v2.jsx --- .../src/views/PlayerPanel/PlayerPanel.jsx | 16 ++++++++++++---- .../PlayerTabContents/v2/TabContainer.v2.jsx | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx index dc6d7c2f..49c7f5f1 100644 --- a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx +++ b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx @@ -1965,6 +1965,12 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props ); const clearTimerV2 = useCallback(() => { + if (timerIdV2.current) { + console.log('[clearTimerV2] 타이머 클리어됨'); + const stack = new Error().stack; + const lines = stack.split('\n').slice(1, 4).join(' → '); + console.log('[clearTimerV2] 호출 스택:', lines); + } clearTimeout(timerIdV2.current); timerIdV2.current = null; }, []); @@ -2153,8 +2159,12 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props resetTimerV2(REGULAR_TIMEOUT); return () => { - if (timerIdV2.current) { - clearTimerV2(); + // cleanup: tabIndex가 2가 아니거나 오버레이가 사라질 때만 타이머 클리어 + if (!belowContentsVisible || videoVerticalVisible || tabIndexV2 !== 2) { + if (timerIdV2.current) { + console.log('[TabContainerV2] cleanup - 타이머 클리어'); + clearTimerV2(); + } } }; }, [ @@ -2162,8 +2172,6 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props tabIndexV2, belowContentsVisible, videoVerticalVisible, - resetTimerV2, - clearTimerV2, ]); // TabIndex 1 자동 다음 단계로 이동 diff --git a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/TabContainer.v2.jsx b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/TabContainer.v2.jsx index c038f27b..f675c6e6 100644 --- a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/TabContainer.v2.jsx +++ b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/TabContainer.v2.jsx @@ -130,7 +130,7 @@ export default function TabContainerV2({ e.stopPropagation(); e.preventDefault(); if (onTabClose) { - onTabClose(1); // tabIndex를 1로 설정 + onTabClose(2); // tabIndex를 2로 설정 } }, [onTabClose]