diff --git a/com.twin.app.shoptime/src/views/DetailPanel/DetailPanel.jsx b/com.twin.app.shoptime/src/views/DetailPanel/DetailPanel.jsx index 40c51d8c..5b72bc1b 100644 --- a/com.twin.app.shoptime/src/views/DetailPanel/DetailPanel.jsx +++ b/com.twin.app.shoptime/src/views/DetailPanel/DetailPanel.jsx @@ -713,6 +713,24 @@ export default function DetailPanel({ panelInfo, isOnTop, spotlightId }) { // eslint-disable-next-line react-hooks/exhaustive-deps }, []); // 마운트/언마운트 시에만 실행 + // MediaPanel modal 상태 변화 감지 -> ProductVideo로 포커스 이동 + useEffect(() => { + const topPanel = panels[panels.length - 1]; + + // MediaPanel이 modal=true로 복귀했을 때 포커스를 ProductVideo로 이동 + if ( + topPanel && + topPanel.name === panel_names.MEDIA_PANEL && + topPanel.panelInfo.modal === true + ) { + console.log('[DetailPanel] MediaPanel modal=true detected - focusing ProductVideo'); + const focusTimer = setTimeout(() => { + Spotlight.focus('product-video-player'); + }, 500); + return () => clearTimeout(focusTimer); + } + }, [panels]); + return (