[251120] fix: PlayerPanel tabIndex=2 focus done

🕐 커밋 시간: 2025. 11. 20. 16:17:48

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

📝 수정된 파일:
  ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerOverlay/PlayerOverlayContents.jsx
  ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/LiveChannelNext.jsx
  ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/ShopNowButton.jsx

🔧 주요 변경 내용:
  • 소규모 기능 개선
This commit is contained in:
2025-11-20 16:17:49 +09:00
parent 90481f787d
commit bbcc4eddd1
3 changed files with 77 additions and 20 deletions

View File

@@ -12,9 +12,16 @@ export default function ShopNowButton({ onClick }) {
const handleSpotlightUp = (e) => {
e.stopPropagation();
e.preventDefault();
if (!Spotlight.focus('player-subtitlebutton')) {
Spotlight.focus(SpotlightIds.PLAYER_BACK_BUTTON);
}
// tabIndexV2가 2일 때만 Back 버튼으로 포커스
// 이 속성은 부모 컴포넌트에서 props로 받아야 하지만, 일단 Back 버튼으로 직접 이동
Spotlight.focus(SpotlightIds.PLAYER_BACK_BUTTON);
};
const handleSpotlightDown = (e) => {
e.stopPropagation();
e.preventDefault();
// tabIndexV2가 2일 때만 CC 버튼으로 내려가기
Spotlight.focus('player-subtitlebutton');
};
return (
<div className={css.container}>
@@ -23,6 +30,7 @@ export default function ShopNowButton({ onClick }) {
onClick={onClick}
spotlightId="below-tab-shop-now-button"
onSpotlightUp={handleSpotlightUp}
onSpotlightDown={handleSpotlightDown}
>
<span className={css.buttonText}>SHOP NOW</span>
</SpottableDiv>