[251119] fix: PlayerPanel - 3
🕐 커밋 시간: 2025. 11. 19. 10:35:57 📊 변경 통계: • 총 파일: 1개 • 추가: +28줄 • 삭제: -12줄 📝 수정된 파일: ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx 🔧 주요 변경 내용: • 소규모 기능 개선
This commit is contained in:
@@ -2060,25 +2060,41 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props
|
|||||||
// PlayerPanel이 최상단이 될 때 오버레이 표시 (DetailPanel에서 복귀)
|
// PlayerPanel이 최상단이 될 때 오버레이 표시 (DetailPanel에서 복귀)
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isOnTop && !panelInfo.modal && !videoVerticalVisible) {
|
if (isOnTop && !panelInfo.modal && !videoVerticalVisible) {
|
||||||
console.log('[PlayerPanel] ✅ DetailPanel에서 복귀함! - 오버레이 표시');
|
// launchedFromPlayer가 있는지 확인하여 HomePanel 복귀와 PlayerPanel 내부 DetailPanel 복귀 구분
|
||||||
|
const hasLaunchedFromPlayer = panelInfo?.lastFocusedTargetId !== undefined;
|
||||||
|
|
||||||
|
if (hasLaunchedFromPlayer) {
|
||||||
|
console.log('[PlayerPanel] ✅ PlayerPanel 내부 DetailPanel에서 복귀함! - 오버레이 표시');
|
||||||
|
} else {
|
||||||
|
console.log('[PlayerPanel] 📺 HomePanel에서 복귀함 - 오버레이 표시');
|
||||||
|
// HomePanel에서 복귀 시 항상 tabIndex=1로 시작
|
||||||
|
console.log('[PlayerPanel] 🔄 HomePanel 복귀 - tabIndex를 1로 강제 설정');
|
||||||
|
if (tabContainerVersion === 2) {
|
||||||
|
setTabIndexV2(1);
|
||||||
|
console.log('[PlayerPanel] 📝 tabIndexV2를 1로 설정됨');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
setSideContentsVisible(true);
|
setSideContentsVisible(true);
|
||||||
console.log('[setBelowContentsVisible] DetailPanel에서 복귀 - true로 변경');
|
console.log('[setBelowContentsVisible] 복귀 - true로 변경');
|
||||||
setBelowContentsVisible(true);
|
setBelowContentsVisible(true);
|
||||||
// VideoPlayer가 belowContentsVisible prop을 감지해서 자동으로 controls 표시함
|
// VideoPlayer가 belowContentsVisible prop을 감지해서 자동으로 controls 표시함
|
||||||
|
|
||||||
// DetailPanel에서 복귀 시 포커스 복원 시도
|
// PlayerPanel 내부 DetailPanel에서 복귀 시에만 포커스 복원 시도
|
||||||
const lastFocusedTargetId = panelInfo?.lastFocusedTargetId;
|
if (hasLaunchedFromPlayer) {
|
||||||
console.log('[PlayerPanel] 🎯 DetailPanel 복귀 - lastFocusedTargetId:', lastFocusedTargetId);
|
const lastFocusedTargetId = panelInfo?.lastFocusedTargetId;
|
||||||
|
console.log('[PlayerPanel] 🎯 PlayerPanel DetailPanel 복귀 - lastFocusedTargetId:', lastFocusedTargetId);
|
||||||
|
|
||||||
if (lastFocusedTargetId) {
|
if (lastFocusedTargetId) {
|
||||||
// ShopNowContents가 렌더링될 때까지 잠시 대기 후 포커스 복원
|
// ShopNowContents가 렌더링될 때까지 잠시 대기 후 포커스 복원
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
console.log('[PlayerPanel] 🔍 500ms 후 포커스 복원 시도:', lastFocusedTargetId);
|
console.log('[PlayerPanel] 🔍 500ms 후 포커스 복원 시도:', lastFocusedTargetId);
|
||||||
Spotlight.focus(lastFocusedTargetId);
|
Spotlight.focus(lastFocusedTargetId);
|
||||||
}, 500);
|
}, 500);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [isOnTop, panelInfo.modal, videoVerticalVisible, panelInfo?.lastFocusedTargetId]);
|
}, [isOnTop, panelInfo.modal, videoVerticalVisible, panelInfo?.lastFocusedTargetId, tabContainerVersion, setTabIndexV2]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// tabContainerVersion === 1일 때만 실행
|
// tabContainerVersion === 1일 때만 실행
|
||||||
|
|||||||
Reference in New Issue
Block a user