From 110ffd011808b94996d79451dcbe010c78b0c9a6 Mon Sep 17 00:00:00 2001 From: Will Miao <13051207myq@gmail.com> Date: Fri, 6 Jun 2025 10:32:18 +0800 Subject: [PATCH] Refactor modal close behavior: ensure consistent handling of closeOnOutsideClick option across multiple modals. --- static/js/managers/ModalManager.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/static/js/managers/ModalManager.js b/static/js/managers/ModalManager.js index 99f00d86..fa196dc6 100644 --- a/static/js/managers/ModalManager.js +++ b/static/js/managers/ModalManager.js @@ -45,8 +45,7 @@ export class ModalManager { onClose: () => { this.getModal('checkpointDownloadModal').element.style.display = 'none'; document.body.classList.remove('modal-open'); - }, - closeOnOutsideClick: true + } }); } @@ -69,8 +68,7 @@ export class ModalManager { onClose: () => { this.getModal('excludeModal').element.classList.remove('show'); document.body.classList.remove('modal-open'); - }, - closeOnOutsideClick: true + } }); } @@ -94,7 +92,8 @@ export class ModalManager { onClose: () => { this.getModal('settingsModal').element.style.display = 'none'; document.body.classList.remove('modal-open'); - } + }, + closeOnOutsideClick: true }); } @@ -118,7 +117,8 @@ export class ModalManager { onClose: () => { this.getModal('supportModal').element.style.display = 'none'; document.body.classList.remove('modal-open'); - } + }, + closeOnOutsideClick: true }); } @@ -130,7 +130,8 @@ export class ModalManager { onClose: () => { this.getModal('updateModal').element.style.display = 'none'; document.body.classList.remove('modal-open'); - } + }, + closeOnOutsideClick: true }); }