[MAP] input modal 에서 저장버튼 클릭 후 다시 오픈할 때, modal 내부에 포커스가 남아있어서 modal 이 오픈되지 않는 이슈 (modal-backdrop 만 열려서 전체 클릭이 막힘)

This commit is contained in:
Hyojin Ahn 2025-10-31 15:24:11 -04:00
parent 96baf7e145
commit df9471e597
1 changed files with 8 additions and 0 deletions

View File

@ -1390,6 +1390,14 @@ function popup(){
}
function initInput(customer_id){
// input modal 에서 저장버튼 클릭 후 다시 오픈할 때, modal 내부에 포커스가 남아있어서 modal 이 오픈되지 않는 이슈 (modal-backdrop 만 열려서 전체 클릭이 막힘)
// 1. 현재 포커스를 가진 요소에서 포커스를 제거하고 body에 포커스
jQuery(':focus').blur();
jQuery('body').focus();
// 2. 모달 자체의 속성 초기화 (Bootstrap의 동작을 돕기 위해 유지)
jQuery('#map-modal-input').attr('aria-hidden', 'false').removeAttr('tabindex');
// end input modal
let loadingTxt = 'Loading...';
jQuery("#map-modal-input .shortinput-store-name").text(loadingTxt);