()
| 781 | |
| 782 | let canceled = false; |
| 783 | const doClose = () => { |
| 784 | canceled = true; |
| 785 | window.currentEditor = null; |
| 786 | window.currentEditorSourceId = ''; |
| 787 | modal.remove(); |
| 788 | }; |
| 789 | |
| 790 | // Wire close actions right away |
| 791 | modal.addEventListener("keydown", (e) => { if (e.key === "Escape") doClose(); }); |