Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot edit any macro after closing any macro windows by pressing the x button #7

Open
kurisu-n opened this issue Jan 24, 2022 · 1 comment

Comments

@kurisu-n
Copy link

When I open any macro window and then close it by pressing the x button any other macro window I open, the code cannot be edited. If I close it by pressing "Save Macro" or the Escape Key this doesn't happen.

@RichardRobertson
Copy link

RichardRobertson commented May 29, 2022

I've run into this issue too. Looks like the editor is only cleaned up when the form on the macro editor dialog is submitted.

form.addEventListener("submit", () => {
activeEditors.delete(editor);
editor.dispose();
// probably unnecessary but we should clean up after ourselves.
observer.disconnect();
});

I believe this can be fixed by updating the hook for renderMacroConfig to take the appId of the new dialog and map it to the editor instance created. Then add a hook for closeMacroConfig and clean up the associated editor. Then the form submit listener would be removed since it would be redundant.

I attempted to fork and make a pull request but wow, I clearly do not know how Typescript works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants