From 7072c1f2d3cfef49fc989de56e50328f7212c600 Mon Sep 17 00:00:00 2001 From: Sycun <165354365+Sycun@users.noreply.github.com> Date: Fri, 13 Nov 2026 16:50:57 +0800 Subject: [PATCH] fix(vulnerabilities): close inspector on backdrop click --- web/static/js/vulnerability-workspace.js | 5 +++++ web/templates/index.html | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/web/static/js/vulnerability-workspace.js b/web/static/js/vulnerability-workspace.js index 13678091..2b041075 100644 --- a/web/static/js/vulnerability-workspace.js +++ b/web/static/js/vulnerability-workspace.js @@ -197,6 +197,11 @@ function refreshVulnerabilityInspector(id) { ['vulnerability-inspector','vulnerability-merge-modal'].forEach(id => { const dialog = document.getElementById(id); if (!dialog) return; + if (id === 'vulnerability-inspector') { + dialog.addEventListener('click', event => { + if (event.target === dialog) closeAppModal(id); + }); + } dialog.addEventListener('keydown', event => { if (event.key === 'Escape' && !vulnerabilityMergeBusy) { closeAppModal(id); diff --git a/web/templates/index.html b/web/templates/index.html index 838d9e19..f50cfc74 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -7132,7 +7132,7 @@ - +