On Windows at least, Enter clicks the primary button even if something else has focus.  For a simple text-input dialog (think `prompt()` in JS, for example), this is actually desirable: you can type a value and then dismiss the dialog by pressing Enter without having to move your hand to the mouse.  This is just an odd exception to that rule.

Btw, if we had more sane keyboard handling for dialogs (e.g. a global bubble handler) then we could easily fix this simply by calling stopPropagation() from the text field.  It's only the weird way Dialog captures key events that makes this tricky to fix...