Problem submitting a form after a UI.Dialog has been closed with the escape key

Problem submitting a form after a UI.Dialog has been closed with the escape key


I want to submit a form within the close event of a ui.dialog.
If I close the dialog by using the X in the upper right corner,
everything works as expected.
But, if I close the dialog by using the Escape key,
the callback functions is called, but the submitting of the form does
not work.
For me it seems, as the Escape key is not "consumed" by the dialog and
aborts the submitting of the form.
Same behaviour in IE and Firefox.
Firefox tells me in the state line that the loading has been stopped.