diff --git a/static/js/user_profile.js b/static/js/user_profile.js index 0e47f41..ab300ec 100644 --- a/static/js/user_profile.js +++ b/static/js/user_profile.js @@ -295,7 +295,12 @@ function searchTown(el){ success: function(data){ el.style.background = 'white url("/static/img/png/icon-arrow.svg") no-repeat calc(100% - 15px) center'; loader_place_ins_boris(el,"el") - document.querySelector(".container_form_search_carrier").style.zIndex = '10000000000' + if (document.querySelector(".container_form_search_carrier")){ + document.querySelector(".container_form_search_carrier").style.zIndex = '10000000000' + } + + + return insertSearchList(data, el.name + '_list'); middleWareJS() @@ -373,9 +378,11 @@ function onblurInputField(event,el){ let parent_event = $(event.explicitOriginalTarget).parents('.input_list' ); if(!parent_event || parent_event[0] !== search_list){ - search_list.classList.remove('show') - document.querySelector(".container_form_search_carrier").style.zIndex = 'unset' - } + search_list.classList.remove('show') + if (document.querySelector(".container_form_search_carrier")){ + document.querySelector(".container_form_search_carrier").style.zIndex = '10000000000' + } + } // } }