[SHOPTIME-3981] ShopLc / 미로그인 후 앱 실행 / 라이브 상품 결제를 위해 lg account 로그인 후 포커싱 사라짐 현상

[수정사항] 특정 webOSVersion에서 (22)
lg account로 진입 후 다시 앱으로 되돌아왔을때 reLaunch가아닌 백그라운드로 실행이되고있으면 포커스가 사라지는 현상

루나 API 요청이 완료되면 마지막 focusElement를 잡아서 포커스 해주는 테스트 로직 추가
This commit is contained in:
dongyoungKo
2025-03-07 17:03:46 +09:00
parent 0f760cafa1
commit d61715bc54

View File

@@ -335,9 +335,16 @@ export const launchMembershipApp = () => (dispatch, getState) => {
return;
}
const lastFocusedElement = Spotlight.getCurrent();
lunaSend.launchMembershipApp(returnPath, {
onSuccess: (res) => {
console.log("membership launch success: ", res);
setTimeout(() => {
if (lastFocusedElement && document.contains(lastFocusedElement)) {
Spotlight.focus(lastFocusedElement);
}
}, 100);
},
onFailure: (err) => {
console.log("membership launch failed:", err);