More controls on closing a dialog.