diff --git a/nnotepad/js/index.js b/nnotepad/js/index.js index b96e5ca1..798653aa 100644 --- a/nnotepad/js/index.js +++ b/nnotepad/js/index.js @@ -71,10 +71,7 @@ document.addEventListener('DOMContentLoaded', async (e) => { ); $$('dialog').forEach((dialog) => { dialog.addEventListener('click', (e) => { - if (e.target && - (e.target.id === 'srcClose' || e.target.id === 'helpClose')) { - return; - } + if (e.target !== dialog) return; const rect = e.target.getBoundingClientRect(); if ( e.clientY < rect.top ||