Fix 7598: showModalDialogUsingTemplate doesn't blur current editor

Since every dialog has at least one button that is not disabled (to be able to close the dialog), this will set the focus on any other button when the primary one is disabled.