How can I control new tab action in react native WebView

Multi tool use


How can I control new tab action in react native WebView
I'm using react native WebView.
there is a problem when specific web pages.
1. Normal behavior of mobile browser
Clicking the Find Zip Code button will open a new tab, find and select an address, and the tab is automatically closed. The selected zip code is entered in a specific input box.
2. Error of react native WebView
If I click the Find Zip Code button, page open to the next page instead of the new tab. Finding zip code page does not automatically closed when I select address. because It is not a tab. if I press Back button completely leaves the order page.
I checked the function to call when clicking the Find Zip Code button on related homepage.
function post_daum() {
new daum.Postcode({
oncomplete: function(data) {
// 팝업에서 검색결과 항목을 클릭했을때 실행할 코드를 작성하는 부분.
// 각 주소의 노출 규칙에 따라 주소를 조합한다.
// 내려오는 변수가 값이 없는 경우엔 공백('')값을 가지므로, 이를 참고하여 분기 한다.
var fullAddr = ''; // 최종 주소 변수
var extraAddr = ''; // 조합형 주소 변수
// 사용자가 선택한 주소 타입에 따라 해당 주소 값을 가져온다.
if (data.userSelectedType === 'R') { // 사용자가 도로명 주소를 선택했을 경우
fullAddr = data.roadAddress;
} else { // 사용자가 지번 주소를 선택했을 경우(J)
fullAddr = data.jibunAddress;
}
// 사용자가 선택한 주소가 도로명 타입일때 조합한다.
if(data.userSelectedType === 'R'){
//법정동명이 있을 경우 추가한다.
if(data.bname !== ''){
extraAddr += data.bname;
}
// 건물명이 있을 경우 추가한다.
if(data.buildingName !== ''){
extraAddr += (extraAddr !== '' ? ', ' + data.buildingName : data.buildingName);
}
// 조합형주소의 유무에 따라 양쪽에 괄호를 추가하여 최종 주소를 만든다.
fullAddr += (extraAddr !== '' ? ' ('+ extraAddr +')' : '');
}
// 우편번호와 주소 정보를 해당 필드에 넣는다.
// document.getElementById('sample6_postcode').value = data.zonecode; //5자리 새우편번호 사용
document.getElementById('daum_add1').value = fullAddr;
document.getElementById('daum_post1').value = data.zonecode.substr(0,3); //5자리 새우편번호 사용
document.getElementById('daum_post2').value = data.zonecode.substr(3,2); //5자리 새우편번호 사용
// 커서를 상세주소 필드로 이동한다.
document.getElementById('daum_add2').focus();
}
}).open();
}
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.