Skip to content

Commit

Permalink
[NNotepad] Fix #253 e.target.close is not a function error (#254)
Browse files Browse the repository at this point in the history
* [NNotepad] Fix #253 e.target.close is not a function error

* check dialog for e.target directly
  • Loading branch information
ibelem authored Jun 21, 2024
1 parent 6aaa22b commit 9c37259
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions nnotepad/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ document.addEventListener('DOMContentLoaded', async (e) => {
);
$$('dialog').forEach((dialog) => {
dialog.addEventListener('click', (e) => {
if (e.target !== dialog) return;
const rect = e.target.getBoundingClientRect();
if (
e.clientY < rect.top ||
Expand Down

0 comments on commit 9c37259

Please sign in to comment.