Bug: form submit handler pop-up code editor window closes on click

I have a form that exists in a modal.

On the "submit" button, I have an event handler.

Under "Advanced" "Only run when" you have the option to open the pop-up code editor.

It opens fine, showing whatever content was entered.

If you click inside the pop-up code editor, it closes.

This occurs if you try to edit the component with the modal open, or with the modal closed.