[shoptime-3994] 라이브 상품 클릭시 포커스 수정
This commit is contained in:
@@ -317,7 +317,6 @@ const PlayerPanel = ({
|
||||
const panelInfoRef = usePrevious(panelInfo);
|
||||
|
||||
const initialFocusTimeoutJob = useRef(new Job((func) => func(), 100));
|
||||
const shopNowFocusTimeoutJob = useRef(new Job((func) => func(), 100));
|
||||
const liveLogParamsRef = useRef(null);
|
||||
const vodLogParamsRef = useRef(null);
|
||||
const mediaLogParamsRef = useRef(null);
|
||||
@@ -983,6 +982,16 @@ const PlayerPanel = ({
|
||||
setIsInitialFocusOccurred(true);
|
||||
|
||||
return;
|
||||
} else {
|
||||
initialFocusTimeoutJob.current.start(() => {
|
||||
const retryTarget = findSelector(
|
||||
`[data-spotlight-id="${targetId}"]`
|
||||
);
|
||||
if (retryTarget) {
|
||||
Spotlight.focus(retryTarget);
|
||||
setIsInitialFocusOccurred(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1016,23 +1025,6 @@ const PlayerPanel = ({
|
||||
}
|
||||
|
||||
if (!panelInfo.modal && !videoVerticalVisible && !hasProperSpot) {
|
||||
if (
|
||||
panelInfo.sourcePanel === "featuredbrandspanel" &&
|
||||
shopNowInfo?.length > 0
|
||||
) {
|
||||
const shopNowElement = document.querySelector(
|
||||
'[data-spotlight-id="playVideoShopNowBox"]'
|
||||
);
|
||||
|
||||
if (shopNowElement) {
|
||||
Spotlight.focus("playVideoShopNowBox");
|
||||
} else {
|
||||
shopNowFocusTimeoutJob.current.start(() => {
|
||||
Spotlight.focus("playVideoShopNowBox");
|
||||
});
|
||||
}
|
||||
return;
|
||||
}
|
||||
Spotlight.focus(SpotlightIds.PLAYER_TAB_BUTTON);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user