Board Thread:Support Requests - Getting Technical/@comment-24475667-20140611185607/@comment-452-20140611235926

You should instead detect when the form is submitted, because pressing "enter" in the Edit Summary can submit the form, and there is a second submit button in the preview modal.

I use The last part switches the order of the events, so your function is fired before the form is submitted.

You'll obviously want to add some conditional logic in there, because as-is, you'd never be able to submit an edit with this code.

Please be aware that popping up an alert box on submit may violate the customization policy.