[상품상세 포커스 수정]

- 영상 존재시 영상으로 포커스 , 이외에는 상품 이미지 첫번째로 포커스가도록 수정.
This commit is contained in:
junghoon86.park
2025-12-08 17:05:50 +09:00
parent b6bcc7dadc
commit 7507f81c34

View File

@@ -322,12 +322,17 @@ export default function ProductAllSection({
if (!container) return; if (!container) return;
if (typeof container.scrollTo === 'function') { if (typeof container.scrollTo === 'function') {
scrollTop({ y: 0, animate: true }); scrollTop({ y: 0, animate: true });
const timeOut = setTimeout(()=>{ setTimeout(()=>{
Spotlight.focus("product-detail-container-0"); if(hasVideo){
Spotlight.focus("product-video-player");
} else {
Spotlight.focus("product-detail-container-0");
}
},100); },100);
} }
}, [ }, [
scrollTop scrollTop,
hasVideo
]); ]);
useEffect(() => { useEffect(() => {
@@ -1784,7 +1789,7 @@ export default function ProductAllSection({
id="product-details-section" id="product-details-section"
ref={productDetailRef} ref={productDetailRef}
onFocus={() => handleButtonFocus('product')} onFocus={() => handleButtonFocus('product')}
onBlur={handleButtonBlur} onBlur={handleButtonBlur}
> >
{/* 비디오가 있으면 먼저 렌더링 (productVideoVersion이 3이 아닐 때만) */} {/* 비디오가 있으면 먼저 렌더링 (productVideoVersion이 3이 아닐 때만) */}
{hasVideo && renderItems[0].type === 'video' && productVideoVersion !== 3 && ( {hasVideo && renderItems[0].type === 'video' && productVideoVersion !== 3 && (