[251118] fix: HomePanel focus resotoration remove

🕐 커밋 시간: 2025. 11. 18. 10:14:26

📊 변경 통계:
  • 총 파일: 3개
  • 추가: +68줄
  • 삭제: -23줄

📝 수정된 파일:
  ~ com.twin.app.shoptime/src/actions/playActions.js
  ~ com.twin.app.shoptime/src/views/HomePanel/HomePanel.jsx
  ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.module.less

🔧 주요 변경 내용:
  • 핵심 비즈니스 로직 개선
  • 소규모 기능 개선
This commit is contained in:
2025-11-18 10:14:27 +09:00
parent f8acaa2c3b
commit 508e9e1042
3 changed files with 68 additions and 23 deletions

View File

@@ -547,7 +547,14 @@ const HomePanel = ({ isOnTop }) => {
const _onFocusedContainerId = useCallback(
(containerId) => {
setFocusedContainerId(containerId);
console.log('[_onFocusedContainerId] 호출됨:', {
containerId,
enterThroughGNB,
isOnTop,
condition: enterThroughGNB && cbChangePageRef.current && !isOnTop,
});
if (enterThroughGNB && cbChangePageRef.current && !isOnTop) {
console.log('[_onFocusedContainerId] ⚠️ 맨 위로 스크롤 강제 실행!');
Spotlight.resume();
cbChangePageRef.current(0, false);
Spotlight.focus(defaultFocus);
@@ -558,28 +565,10 @@ const HomePanel = ({ isOnTop }) => {
}
if (!firstSpot) {
setTimeout(() => {
Spotlight.resume();
setFirstSpot(true);
// 비디오가 1px로 축소된 상태가 아닐 때만 finishVideoPreview 호출
const isVideoShrunk = panels.some(
(panel) => panel.name === panel_names.PLAYER_PANEL && panel.panelInfo?.shouldShrinkTo1px
);
// if (Spotlight.getPointerMode() && !isVideoShrunk) {
// dispatch(finishVideoPreview());
// }
// if (panelInfo.currentCatCd) {
// Spotlight.focus('spotlightId-' + panelInfo.currentCatCd);
// }
if (panelInfo.currentSpot) {
Spotlight.focus(panelInfo.currentSpot);
}
// }
//exit popup case
Spotlight.focus(SpotlightIds.TPOPUP);
setBtnDisabled(false);
}, 0);
// 초기 포커스 복원으로 스크롤이 튀는 현상 방지: 첫 진입 시 포커스 이동을 생략
setFirstSpot(true);
setBtnDisabled(false);
return;
}
},
[
@@ -770,6 +759,26 @@ const HomePanel = ({ isOnTop }) => {
console.log('[HomePanel] isOnTop:', isOnTop);
console.log('[HomePanel] videoPlayIntentRef.current:', videoPlayIntentRef.current);
console.log('[HomePanel] lastPlayedBannerIdRef.current:', lastPlayedBannerIdRef.current);
// [TODO] DetailPanel 닫힘 후 비디오 자동 재생 복구
if (videoPlayIntentRef.current && lastPlayedBannerIdRef.current) {
dispatch(startVideoPlayerNew({
modal: true,
modalContainerId: 'home-video-modal',
modalClassName: 'home-video-modal',
bannerId: lastPlayedBannerIdRef.current,
videoId: videoPlayIntentRef.current.videoId,
showUrl: videoPlayIntentRef.current.showUrl,
patnrId: videoPlayIntentRef.current.patnrId,
showId: videoPlayIntentRef.current.showId,
shptmBanrTpNm: videoPlayIntentRef.current.shptmBanrTpNm,
lgCatCd: videoPlayIntentRef.current.lgCatCd,
}));
// refs 초기화
videoPlayIntentRef.current = null;
lastPlayedBannerIdRef.current = null;
}
}
}, [detailPanelClosedTime, isOnTop]);