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]