When a dialog opens, the focus should go on the title and not on the first interactive element (which could be the close-button in the footer). This is important for users dependent on screen readers.
To not lose the comfort of directly submit-and-close a dialog, the default button shall trigger on enter key (if no other interactive element is under focus).