[251115] fix: DetailPanel FullScree issue

🕐 커밋 시간: 2025. 11. 15. 19:07:15

📊 변경 통계:
  • 총 파일: 2개
  • 추가: +20줄
  • 삭제: -1줄

📝 수정된 파일:
  ~ com.twin.app.shoptime/src/actions/panelActions.js
  ~ com.twin.app.shoptime/src/views/MediaPanel/MediaPanel.v3.jsx

🔧 함수 변경 내용:
  📄 com.twin.app.shoptime/src/views/MediaPanel/MediaPanel.v3.jsx (javascript):
    🔄 Modified: normalizeModalStyle()

🔧 주요 변경 내용:
  • 핵심 비즈니스 로직 개선
This commit is contained in:
2025-11-15 19:07:15 +09:00
parent 3b9773394c
commit 2ac217fb10
2 changed files with 20 additions and 1 deletions

View File

@@ -1,5 +1,19 @@
import { types } from './actionTypes'; import { types } from './actionTypes';
import Spotlight from '@enact/spotlight'; import Spotlight from '@enact/spotlight';
import { panel_names } from '../utils/Config';
// 시작 메뉴 추적을 위한 상수
export const SOURCE_MENUS = {
HOME_BEST_SELLER: 'home_best_seller',
HOME_PICKED_FOR_YOU: 'home_picked_for_you',
HOME_SUB_CATEGORY: 'home_sub_category',
HOME_RANDOM_UNIT: 'home_random_unit',
HOME_ROLLING_UNIT: 'home_rolling_unit',
HOME_EVENT_POPUP: 'home_event_popup',
HOME_TODAYS_DEAL: 'home_todays_deal',
THEMED_PRODUCT: 'themed_product',
GENERAL_PRODUCT: 'general_product',
};
/* /*
name: panel_names.PLAYER_PANEL, name: panel_names.PLAYER_PANEL,

View File

@@ -210,6 +210,7 @@ const MediaPanel = React.forwardRef(
}); });
const videoPlayer = useRef(null); const videoPlayer = useRef(null);
const isTransitioningToFullscreen = useRef(false);
const [playListInfo, setPlayListInfo] = USE_STATE('playListInfo', ''); const [playListInfo, setPlayListInfo] = USE_STATE('playListInfo', '');
const [shopNowInfo, setShopNowInfo] = USE_STATE('shopNowInfo'); const [shopNowInfo, setShopNowInfo] = USE_STATE('shopNowInfo');
const [backupInitialIndex, setBackupInitialIndex] = USE_STATE('backupInitialIndex', 0); const [backupInitialIndex, setBackupInitialIndex] = USE_STATE('backupInitialIndex', 0);
@@ -931,11 +932,14 @@ const MediaPanel = React.forwardRef(
//todo if(modal) //todo if(modal)
return () => { return () => {
// 패널이 2개 존재할때만 popPanel 진행 // 패널이 2개 존재할때만 popPanel 진행
if (panelInfo.modal && !isOnTop) { // fullscreen 전환 중이면 popPanel하지 않음
if (panelInfo.modal && !isOnTop && !isTransitioningToFullscreen.current) {
dispatch(PanelActions.popPanel()); dispatch(PanelActions.popPanel());
} else { } else {
Spotlight.focus('tbody'); Spotlight.focus('tbody');
} }
// fullscreen 전환 완료 후 플래그 초기화
isTransitioningToFullscreen.current = false;
}; };
}, [panelInfo?.modal, isOnTop]); }, [panelInfo?.modal, isOnTop]);
@@ -1100,6 +1104,7 @@ const MediaPanel = React.forwardRef(
}, [dispatch]); }, [dispatch]);
const enterFullscreen = useCallback(() => { const enterFullscreen = useCallback(() => {
isTransitioningToFullscreen.current = true;
dispatch(switchMediaToFullscreen()); dispatch(switchMediaToFullscreen());
}, [dispatch]); }, [dispatch]);