fix:모달 닫기 이벤트를 document 레벨로 변경

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
pro
2026-01-29 21:40:25 +09:00
parent d4a6b042ef
commit 96f112af0e

View File

@@ -307,9 +307,12 @@ class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none foc
});
// 이벤트 델리게이션: data-close-modal 속성을 가진 요소 클릭 시 모달 닫기
document.getElementById('partnerModal').addEventListener('click', function(e) {
if (e.target.closest('[data-close-modal]')) {
closePartnerModal();
document.addEventListener('click', function(e) {
const closeBtn = e.target.closest('[data-close-modal]');
if (closeBtn) {
e.preventDefault();
e.stopPropagation();
window.closePartnerModal();
}
});
</script>