fix(vulnerabilities): close inspector on backdrop click

This commit is contained in:
Sycun 2026-11-13 16:50:57 +08:00
parent b77c8cda27
commit 7072c1f2d3
2 changed files with 6 additions and 1 deletions

View File

@ -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);

View File

@ -7132,7 +7132,7 @@
<script src="/static/js/fact-graph.js"></script>
<script src="/static/js/projects.js?v=20260819-1-pagination-20261027"></script>
<script src="/static/js/vulnerability.js?v=20261113-tree-views"></script>
<script src="/static/js/vulnerability-workspace.js?v=20261113-long-targets"></script>
<script src="/static/js/vulnerability-workspace.js?v=20261113-drawer-dismiss"></script>
<script src="/static/js/vulnerability-download.js?v=20261030-2"></script>
<script src="/static/js/webshell.js?v=20261011-token-usage-tool-title"></script>
<script src="/static/js/chat-files.js?v=20261103-personal-integration"></script>