diff --git a/com.twin.app.shoptime/src/actions/panelActions.js b/com.twin.app.shoptime/src/actions/panelActions.js index 2312e85a..9d4cabc7 100644 --- a/com.twin.app.shoptime/src/actions/panelActions.js +++ b/com.twin.app.shoptime/src/actions/panelActions.js @@ -1,5 +1,19 @@ import { types } from './actionTypes'; 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, diff --git a/com.twin.app.shoptime/src/views/MediaPanel/MediaPanel.v3.jsx b/com.twin.app.shoptime/src/views/MediaPanel/MediaPanel.v3.jsx index ed424868..b4a87efe 100644 --- a/com.twin.app.shoptime/src/views/MediaPanel/MediaPanel.v3.jsx +++ b/com.twin.app.shoptime/src/views/MediaPanel/MediaPanel.v3.jsx @@ -210,6 +210,7 @@ const MediaPanel = React.forwardRef( }); const videoPlayer = useRef(null); + const isTransitioningToFullscreen = useRef(false); const [playListInfo, setPlayListInfo] = USE_STATE('playListInfo', ''); const [shopNowInfo, setShopNowInfo] = USE_STATE('shopNowInfo'); const [backupInitialIndex, setBackupInitialIndex] = USE_STATE('backupInitialIndex', 0); @@ -931,11 +932,14 @@ const MediaPanel = React.forwardRef( //todo if(modal) return () => { // 패널이 2개 존재할때만 popPanel 진행 - if (panelInfo.modal && !isOnTop) { + // fullscreen 전환 중이면 popPanel하지 않음 + if (panelInfo.modal && !isOnTop && !isTransitioningToFullscreen.current) { dispatch(PanelActions.popPanel()); } else { Spotlight.focus('tbody'); } + // fullscreen 전환 완료 후 플래그 초기화 + isTransitioningToFullscreen.current = false; }; }, [panelInfo?.modal, isOnTop]); @@ -1100,6 +1104,7 @@ const MediaPanel = React.forwardRef( }, [dispatch]); const enterFullscreen = useCallback(() => { + isTransitioningToFullscreen.current = true; dispatch(switchMediaToFullscreen()); }, [dispatch]);